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. QDialogButtonBox Signal for Close not triggering

QDialogButtonBox Signal for Close not triggering

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 2 Posters 367 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.
  • U Offline
    U Offline
    U7Development
    wrote on last edited by
    #1

    Hi!
    When i drag and drop a QDialogButtonBox widget into my form I can connect the signal and slots successfuly OK | Cancel by default work fine.

    Now, i want to change this two into just one called Close (<OK & Cancel> to <Close>).
    The problem is that i have tried accepted and clicked signal with no result, it does nothing when click, tried qDebuging and console output prints nothing too...

    What is the signal for Close button?

    Thanks!

    1 Reply Last reply
    0
    • Christian EhrlicherC Offline
      Christian EhrlicherC Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by
      #2

      The Close button has RejectRole as default: https://doc.qt.io/archives/qt-4.8/qdialogbuttonbox.html#StandardButton-enum so I would expect that rejected() is emitted.

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      1 Reply Last reply
      5
      • U Offline
        U Offline
        U7Development
        wrote on last edited by
        #3

        Ok, i was confussed since Close will save changes, rejected is gramatically not the best name for me but it is ok!
        Thanks!

        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