Reputation: 43
I've done a lot of WPF and am now, for the first time, trying to get a grasp of Qt, so far fairly successful.
However, in WPF, I'm used to encapsulate self-enclosed parts of GUIs in User Controls so that I can then easily re-use them across dialogs or rearrange an entire block without having to touch every single element. If, for example, I was building a main window that would show information about a hospital, about the area it is in and about its manager, I would encapsulate each of the three blocks in a User Control and my main window would just contain three instances of those controls.
With Qt, I was as yet unable to identify the concept I should use for this type of encapsulation. Should I be 'casting' those building blocks as custom widgets? My guess is that Qt has a concept for that which I can't find because I don't know what it's called.
Thanks for your help!
FS
Upvotes: 4
Views: 95
Reputation: 206861
You would create custom classes based on QWidget
or some other simple widget class (QFrame
for instance). It's pretty standard practice, no need for another concept.
Upvotes: 4