Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [solved] Hide Dialog-Window after opening new Dialog-Window
QtWS25 Last Chance

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

Scheduled Pinned Locked Moved General and Desktop
5 Posts 2 Posters 1.3k Views
  • 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 Offline
    S Offline
    superkato
    wrote on last edited by
    #1

    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
    0
    • A Offline
      A Offline
      arsinte_andrei
      wrote on last edited by
      #2

      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
      0
      • S Offline
        S Offline
        superkato
        wrote on last edited by
        #3

        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
        0
        • S Offline
          S Offline
          superkato
          wrote on last edited by
          #4

          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
          0
          • A Offline
            A Offline
            arsinte_andrei
            wrote on last edited by
            #5

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

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved