Reputation: 35
I have a Qt app with multiple QWidgets. I would like to create for each QWidget an .ui file to be able to reuse the same .ui file in different places and to have a simple structure for main.ui. Because now I have a big .cpp file with all slots and signals for all QWidgets and it is not so easy to work. I have not found a solution yet and I would like to know if it's possible. Thank you!
Upvotes: 1
Views: 1402
Reputation: 9701
As far as I know including one such file into another is not supported but I might be mistaken.
If you want to use multiple .ui
files the general practice is to use QUILoader
, which allows loading different such files at runtime.
Frankly I would just go for implementing all this by hand. You can then separate/group the different widgets in whichever way you want.
Upvotes: 1