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] how to add a handler to handle clicking cancel on QWizardPage
Forum Updated to NodeBB v4.3 + New Features

[Solved] how to add a handler to handle clicking cancel on QWizardPage

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 2.5k Views 1 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.
  • D Offline
    D Offline
    donitaroid
    wrote on last edited by
    #1

    I want to do some cleaning process while the user clicking the cancel button on QWizardPage. I know there is already a virtual function cleanupPage() in QWizardPage, but the reference document said that the cleanupPage() would be called when the user leaves the page by clicking Back. It doesn't mention about leaving page by clicking Cancel.

    Would cleanupPage() be called when the user clicking cancel?
    Can I add a handler to handle clicking cancel? or is there any alternative way to handle such cleaning process? Thank you.

    The QWizardPage API reference
    "About cleanupPage() in QWizardPage":http://qt-project.org/doc/qt-4.8/qwizardpage.html

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

      I want to release resources which was used in individual pages. While the user leaves the page, I want all resource that was no longer used to be released.

      I have tried using cleanupPage() to release resources current page was using, but it doesn't work. The function cleanupPage() would only be called while I clicking cancel or back.

      1 Reply Last reply
      0
      • A Offline
        A Offline
        andre
        wrote on last edited by
        #3

        A QWizard is a subclass of QDialog. QDialog has the rejected() signal, that is fired when the dialog (the wizard) is cancelled (or otherwise rejected). You can connect to that signal to do your cleanup.

        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