How to use ui form in anthoer ui from directly without c++ codes.



  • So we can easily design qt ui files.



  • I don't think it's possible, even when using C++ code.

    Because in order to access MainWindow.ui inside MainDialog.ui you'd have to make the object used to display MainWindow.ui global by using extern.

    And every time I've tried to make a .ui object global, my compiler exploded and threw this at me.

    @QWidget: Must construct a QApplication before a QPaintDevice@

    You can test it if you want, go to your main.cpp file and place MainWindow w; outside of your int main() function, chances are your compiler is gonna explode as well.



  • its not possible,
    have to make object for this.



  • Hi,
    You might want to look into how to use ui designer forms in Qt.
    "Designer Ui files in Application":http://qt-project.org/doc/qt-5.0/qtdesigner/designer-using-a-ui-file.html
    It tells you all about the use of the form files.

    Without C++ code?? What do you want to achieve?? Use the same form in multiple dialogs? Change the form for an used dialog??
    Maybe if you tell what you want, we are of more help.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.