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. Dialog close called but not closing?
Qt 6.11 is out! See what's new in the release blog

Dialog close called but not closing?

Scheduled Pinned Locked Moved Solved General and Desktop
4 Posts 2 Posters 651 Views 2 Watching
  • 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.
  • SPlattenS Offline
    SPlattenS Offline
    SPlatten
    wrote on last edited by
    #1

    Under what circumstances will a call to close() not close the dialog?

    I have a button on the dialog with the text Abort, if I click the abort button it calls the close function and this works quite reliably.

    From the application if there is a problem I emit a signal which calls a function called closeDialog, this function calls the close() function, but it isn't closing the dialog, why, what can I do to resolve this?

    Kind Regards,
    Sy

    1 Reply Last reply
    0
    • SPlattenS SPlatten

      @mrjj , only because I am ignorant and didn't know they existed or how and when to use them?

      mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by
      #4

      @SPlatten

      Well, they are mostly used when dialog is being shown modally.
      That is, you call exec() on it.
      Then accept/reject set the result and closes the dialog.
      It's to know if the user canceled or accepted the dialog.

      It's basically the same as calling
      https://doc.qt.io/qt-5/qdialog.html#setResult
      and then the close

      1 Reply Last reply
      1
      • mrjjM Offline
        mrjjM Offline
        mrjj
        Lifetime Qt Champion
        wrote on last edited by
        #2

        Hi
        That I have not heard before.

        However, is three a reason you don't use
        accept()/reject()/done()

        SPlattenS 1 Reply Last reply
        0
        • mrjjM mrjj

          Hi
          That I have not heard before.

          However, is three a reason you don't use
          accept()/reject()/done()

          SPlattenS Offline
          SPlattenS Offline
          SPlatten
          wrote on last edited by
          #3

          @mrjj , only because I am ignorant and didn't know they existed or how and when to use them?

          Kind Regards,
          Sy

          mrjjM 1 Reply Last reply
          0
          • SPlattenS SPlatten

            @mrjj , only because I am ignorant and didn't know they existed or how and when to use them?

            mrjjM Offline
            mrjjM Offline
            mrjj
            Lifetime Qt Champion
            wrote on last edited by
            #4

            @SPlatten

            Well, they are mostly used when dialog is being shown modally.
            That is, you call exec() on it.
            Then accept/reject set the result and closes the dialog.
            It's to know if the user canceled or accepted the dialog.

            It's basically the same as calling
            https://doc.qt.io/qt-5/qdialog.html#setResult
            and then the close

            1 Reply Last reply
            1

            • Login

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