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. Simple override of the QDialog closeEvent(); determing whether user hit OK or Cancel ...
QtWS25 Last Chance

Simple override of the QDialog closeEvent(); determing whether user hit OK or Cancel ...

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 862 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.
  • T Offline
    T Offline
    tmason101
    wrote on last edited by
    #1

    Hello,

    Title says it all; I have the following code snippet:

    @
    void QTTestDialog::closeEvent(QCloseEvent *event) {

    }
    @

    I know how to get this event to fire; but how do I determine whether the user has hit OK or Cancel in my custom QDialog?

    I couldn't find out the answer to this via searching Google or the forums, perhaps I searched the wrong place.

    Thank you for your time.

    1 Reply Last reply
    0
    • D Offline
      D Offline
      dbzhang800
      wrote on last edited by
      #2

      int QDialog::result() const

      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