How to open a new window from the main window in Qt?

后端 未结 3 816
别跟我提以往
别跟我提以往 2021-01-12 14:35

I\'m new to qt programming and would like to know how to open a new window from the main window with the mainwindow disappearing? Is there any source code I can have a look

3条回答
  •  醉酒成梦
    2021-01-12 15:15

    From a slot in your MainWindow call this code :

    QWidget *wdg = new QWidget;
    wdg->show();
    hide();//this will disappear main window
    

提交回复
热议问题