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. QWizard close
Qt 6.11 is out! See what's new in the release blog

QWizard close

Scheduled Pinned Locked Moved Solved General and Desktop
5 Posts 2 Posters 697 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.
  • ivanicyI Offline
    ivanicyI Offline
    ivanicy
    wrote on last edited by
    #1

    Hello!

    I am developing a QWizard and I need to know how can I ignore the "finished()" signal when I close the wizard with the X button. I have a slot connected to the finished() signal and I don't want to execute this slot when the wizard is cancelled.

    Thank you very much

    JonBJ 1 Reply Last reply
    0
    • ivanicyI ivanicy

      @JonB I have connected the rejected signal, but when I close the QWizard, the two signals are emitted (finished and rejected).

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by
      #4

      @ivanicy
      Yes, that is what the documentation states. I gave you the two ways to distinguish what you need to know here: either look at the parameter to finished() or don't use finished() at all and use accepted() for your stuff and rejected() for nothing/the close box.

      ivanicyI 1 Reply Last reply
      1
      • ivanicyI ivanicy

        Hello!

        I am developing a QWizard and I need to know how can I ignore the "finished()" signal when I close the wizard with the X button. I have a slot connected to the finished() signal and I don't want to execute this slot when the wizard is cancelled.

        Thank you very much

        JonBJ Offline
        JonBJ Offline
        JonB
        wrote on last edited by
        #2

        @ivanicy
        Isn't the int result to finished() signal what you want to look at? Or use the accepted() vs rejected() for your work (better)? I assume the close button causes the dialog to return QDialog::Rejected.

        ivanicyI 1 Reply Last reply
        2
        • JonBJ JonB

          @ivanicy
          Isn't the int result to finished() signal what you want to look at? Or use the accepted() vs rejected() for your work (better)? I assume the close button causes the dialog to return QDialog::Rejected.

          ivanicyI Offline
          ivanicyI Offline
          ivanicy
          wrote on last edited by
          #3

          @JonB I have connected the rejected signal, but when I close the QWizard, the two signals are emitted (finished and rejected).

          JonBJ 1 Reply Last reply
          0
          • ivanicyI ivanicy

            @JonB I have connected the rejected signal, but when I close the QWizard, the two signals are emitted (finished and rejected).

            JonBJ Offline
            JonBJ Offline
            JonB
            wrote on last edited by
            #4

            @ivanicy
            Yes, that is what the documentation states. I gave you the two ways to distinguish what you need to know here: either look at the parameter to finished() or don't use finished() at all and use accepted() for your stuff and rejected() for nothing/the close box.

            ivanicyI 1 Reply Last reply
            1
            • JonBJ JonB

              @ivanicy
              Yes, that is what the documentation states. I gave you the two ways to distinguish what you need to know here: either look at the parameter to finished() or don't use finished() at all and use accepted() for your stuff and rejected() for nothing/the close box.

              ivanicyI Offline
              ivanicyI Offline
              ivanicy
              wrote on last edited by
              #5

              @JonB Oh, sorry, now I understand you and it works!! thank you very much!

              1 Reply Last reply
              0
              • ivanicyI ivanicy has marked this topic as solved on

              • Login

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