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. How to catch FINISH button pressed signal in QWizard
Forum Updated to NodeBB v4.3 + New Features

How to catch FINISH button pressed signal in QWizard

Scheduled Pinned Locked Moved General and Desktop
6 Posts 4 Posters 6.7k 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.
  • T Offline
    T Offline
    tesmai4
    wrote on last edited by
    #1

    I added a QWizard in my project using QT designer. I want to save/process values from different ages of my QWizard when user clicks Finish button on the last page of my QWizard.

    I could not find signal related to QWizard default buttons (BACK, NEXT, FINISH etc). How can I catch the signal when user click FINISH button on my QWizard?

    1 Reply Last reply
    0
    • VinorcolaV Offline
      VinorcolaV Offline
      Vinorcola
      wrote on last edited by
      #2

      I think it should be your last QWizardPage that do this work.

      You can register any field from any page so their value is accessible to other pages. http://qt-project.org/doc/qt-5/qwizardpage.html#registerField

      Then, your last page do the work.
      http://qt-project.org/doc/qt-5/qwizardpage.html#validatePage

      1 Reply Last reply
      0
      • T Offline
        T Offline
        tesmai4
        wrote on last edited by
        #3

        Thanks for your reply.
        I still can't see the concept implemented in pages created and added using QWizard. I am using QT Designer to create QWizard and add pages to the it.
        I am NOT adding pages to my QWizard pragmatically.

        Would you please post an example doing this?

        1 Reply Last reply
        1
        • p3c0P Offline
          p3c0P Offline
          p3c0
          Moderators
          wrote on last edited by
          #4

          Hi,

          You can use "button":http://qt-project.org/doc/qt-5/qwizard.html#button to get the exact button and then connect signal clicked to your slot.
          So For eg in QWizard based class:
          @
          connect(this->button(QWizard::NextButton),
          SIGNAL(clicked()),this,SLOT(onNextButtonCliked()));
          @

          157

          1 Reply Last reply
          1
          • T Offline
            T Offline
            tesmai4
            wrote on last edited by
            #5

            Thanks for your reply. It worked.

            1 Reply Last reply
            0
            • dheerendraD Offline
              dheerendraD Offline
              dheerendra
              Qt Champions 2022
              wrote on last edited by
              #6

              Assuming that wiz is your topWizard page.

              @ QPushButton but = wiz.findChild<QPushButton>("qt_wizard_finish");
              QObject::connect(but,SIGNAL(clicked()),&w,SLOT(callme()));@

              Edit : I missed the previous answer. Other answer is better. I just kept page open and answered it.

              Dheerendra
              @Community Service
              Certified Qt Specialist
              http://www.pthinks.com

              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