0

I have a QWizard, and I override validateCurrentPage() in order to perform actions before passing to the next page. This function is working well on all pages, except for the last page - where Finish is pressed. the accept() function is called, but not validateCurrentPage().

Judging by Qt docs:

This virtual function is called by QWizard when the user clicks Next or Finish to perform some last-minute validation

this function was supposed to be called just like in any other page.

Why isn't it working?

RanH
  • 740
  • 1
  • 11
  • 31
  • It might be that the function signature is incorrect. – vahancho Nov 14 '17 at 11:54
  • virtual bool validateCurrentPage() override; Also I mentioned that it works for all the pages except for the last one.. so signature should be fine – RanH Nov 14 '17 at 11:59

1 Answers1

0

The problem was that I overridden QDialog::accept() and unless I call QDialog::accept(), validateCurrentPage() wouldn't be called.

RanH
  • 740
  • 1
  • 11
  • 31