Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    [solved] Hide Dialog-Window after opening new Dialog-Window

    General and Desktop
    2
    5
    1080
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S
      superkato last edited by

      Hi,

      how can I hide a Dialog-Window after opening a new Dialog-Window from it ?

      My Storyboard looks like this (its like a wizard but i dont want to use the QWizard class):

      MainWindow -> Button -> Dialog Window -> I fill some Data in the line edit and press a button -> new Dialog Window opens , the old should close but it still in the backgground.

      I'm doing it like this:

      @
      void Konfig_einrichtung::on_pushButton_clicked()
      {

      //open next window
      konfig_einrichtung_betriebsart winbetr;
      winbetr.setModal(true);
      winbetr.exec();
      
      //close this window after new is open
      close(); 
      

      }
      @

      or is there a other way?

      I attached a pic too: http://www.pic-upload.de/view-24486201/Unbenannt.jpg.html

      BR
      Sam

      1 Reply Last reply Reply Quote 0
      • A
        arsinte_andrei last edited by

        Why you do not hide them? or use a signal and slot. I do not think that you can close it (this->accept(); or this->reject();) because of the parent reference. unless you take care of the parent and always set the parent to be the mainWindow. the you can use signal and slots to close it.

        1 Reply Last reply Reply Quote 0
        • S
          superkato last edited by

          thank you.
          which signal and slot should I use?

          Sorry I'm a newbie, thats the first time I ask about help for Qt.

          1 Reply Last reply Reply Quote 0
          • S
            superkato last edited by

            I found a tutorial and build up a project.
            It works now.

            You can find it here: http://www.file-upload.net/download-9480663/untitled.zip.html

            1 Reply Last reply Reply Quote 0
            • A
              arsinte_andrei last edited by

              ok then can you mark it as [SOLVED] in the main post title

              1 Reply Last reply Reply Quote 0
              • First post
                Last post