• Hello, how can I omit the back button of a specific QwizardPage, and in others not omit it?

  • Qt Champions 2016

    if you remove all the buttons , how would user navigate?
    If you are just after having Pages, then a stacked widget does just that.

  • @mrjj I edited the post. The question was wrong.

  • Qt Champions 2016

    Hi you can use setButtonLayout
    but using it on a page by page basis might be klunky.
    Can I ask why back is not allowed on some?
    To use it.
    Define a slot in your own QWizard. ( or mainwindow)

    class ClassWizard : public QWizard
    public slots:
    // called when page is changed. here we just add next.
        void PageChanged(int p) { 
            QList<QWizard::WizardButton> layout;
              layout << QWizard::Stretch << QWizard::NextButton;
        ClassWizard(QWidget *parent = 0);   
    and hook signal up in 
    ClassWizard::ClassWizard(QWidget *parent)
        : QWizard(parent)
    connect(this,&QWizard::currentIdChanged, this, &ClassWizard::PageChanged);

    Then when page change you can add / remove buttons as you like.

    You can call
    void QWizard::next()
    to go to next page

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.