PDA

View Full Version : How to combine the ui file generated by QtDesigner?



stereoMatching
30th January 2014, 15:16
MainWindow.ui
9990

page1.ui
9991

project layout
9992


I want to add the page1.ui into the QTabWidget of the MainWindow.ui
anyway to do that by QtDesigner(without manual hand codings)?
if this is impossible, which kind of solutions would you pick?

anda_skoa
30th January 2014, 15:42
Add a widget to the tab in MainWindow.
Then right click and "promote" it. In the dialog specify the include for the class that will implement page1.ui and promote.
The class name of the widget will change to the class name you have specified.

When uic generates the code for MainWindow, it will generate an include for the specified header and instantiate the specified class in place of the widget.

Cheers,
_

stereoMatching
30th January 2014, 16:14
Thanks, this works like magic