PDA

View Full Version : Is QT ui inheritable?



jiapei100
14th January 2010, 15:05
Hi, all:

I'm wondering if QT ui inheritable?
Say, I've got one .ui named "father.ui",
In "son.ui", I just added up some other widgets upon existing "father.ui".

I'm just wondering, if I can inherit "father.ui" in "son.ui"?

If it's possible, how to deal with it?

Best Regards
JIA

squidge
14th January 2010, 15:20
You can use son.ui to create a QWidget derived object and then use that object in father.ui, if thats what you mean.

high_flyer
14th January 2010, 15:21
you are mixing tings.
The *.ui files are files, you can't "inherit" them in C++.
(although you can load them dynamically in code, and extract the classes they contain, and inherit those classes)

These files however contain classes and you can inherit these classes, and yes, also in other ui's.
Though from the way you are asking, I am not sure what do you understand by "inheriting".