How to use widgets designed in UI designer?
I am new to QT and i cannot find an answer to my question.
I designed a custom dialog using "Add New">"Qt">"Qt Designer Form Class">"Dialog without Buttons".
This custom dialog should have interchangable sections which I designed as well using "Add New">"Qt">"Qt Designer Form">"Widget".
Now I would like to place the widgets into the Dialog. How can I do that?
Thank you in advance,
Hi and welcome to the forums.
You can use the promotion feature.
so in the Dialog, you place a plain widget and then right click and promote it.
when you then run the app, it will be your widget.
promotion is basically just Replace function where you tell it the real class name and what .h file to use.
Thank you for your quick anser.
So that means I should have used "Add New">"Qt">"Qt Designer Form Class">"Widget" instead of "Qt Designer Form"?
Yes if you want to use promotion, then you need the .h file.
(from Qt Designer Form Class)
The stand alone UI file can be used with
but you can not visually add it in another form as promotion does.