c++ - How can I detect the back button being pressed in QWizard? -
i have qwizard , need perform actions each time wizard page becomes visible. doing in validatecurrentpage function have realised called when next button pressed, not button.
i've tried currentidchanged , custombuttonclicked signals these don't called either.
any idea how can respond wizard page shown after button pressed? must missing simple...
thanks, alan
edit: added code , compiler error requested cmannett85
qabstractbutton *backbutton = button(qwizard::backbutton); connect(backbutton, signal(clicked()), this, slot(backclicked)); the full error is:
error 1 error c2664: 'bool qobject::connect(const qobject *,const char *,const qobject *,const char *,qt::connectiontype)' : cannot convert parameter 1 'qabstractbutton *' 'const qobject *'
get button qabstractbutton *qwizard::button (wizardbutton which) , connect slot.
example:
qabstractbutton *backbutton = wizard->button(qwizard::backbutton); connect(backbutton, signal(clicked()), this, slot(backclicked()));
Comments
Post a Comment