How to make objects created in code visible in ui form?
-
-
The designer can't show ui elements which are created in the code afterwards - how should this work?
You can define custom classes in the designer e.g. with promoting them: http://doc.qt.io/qt-5/designer-using-custom-widgets.html -
Hey,
If i have a project A and i want make i new project B, and i copy the code from project A to project B, how do i 'update' the ui form in Qt Design?
Otherwise how would you make ui elements created in code 'pop up' in this form?Thanks.
@DevinQT said in How to make objects created in code visible in ui form?:
Otherwise how would you make ui elements created in code 'pop up' in this form?
As @Christian-Ehrlicher stated, there's no direct way to do it currently.
However, you may want to look at QUiLoader class source code to have some ideas of how they create widgets from a .ui file, so you may end up extending such class into kinda "QUiSaver" that should provide methods like "addWiget()" and "saveToFile()" to achieve your goal