c++ - Common ui base for dialogs in Qt -
in qt widget application, i'd have mutual base of operations view dialogs, inherit other classes it.
this "base/common" view contain set of buttons @ bottom , custom frame info @ top. place in middle used derived classes placing view-specific contents. if mutual dialog style changes in future, changes applied in 1 class only.
is there way utilize such approach in qt, since ui files processed 'uic' create classes? ideally not lose ability of using gui designer, @ to the lowest degree derived classes. hints much appreciated.
you can create "base view" own ui file big qframe in middle nil in , name contentsframe. create other widgets want place within empty contentsframe in designer.
now have couple options. can have both open side side in designer, click on contents widget, select all, , drag contentsframe. nail save , save different widget. if aren't afraid leave designer tiny bit, can add together contents widget base of operations widget in code. either way, create sure setting layout contentsframe or garbage.
c++ qt inheritance user-interface
No comments:
Post a Comment