Connect two windows

  • i want to create two windows and connect how can i do?

  • Hi joojo!
    Welcome to devnet.

    It depends. You need two window in one app or two separate apps?

  • i want to click button in main window and pop up new window.then i do calculations in 2 nd window and submit.then change main window values.

  • Well then then just create the method in second dialog end call it after dialog closed:
    @void on_showdialog_action()
    uSecondDialog *usrDlg = new uSecondDialog(this);
    if(usrDlg->exec() == QDialog::Accepted)
    uCalcResultStruct result = usrDlg->getCalcResult();

    Something like that.
    uCalcResultStruct is some your struct which can store all data you need.


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