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. "One way" QWizard
Qt 6.11 is out! See what's new in the release blog

"One way" QWizard

Scheduled Pinned Locked Moved Solved General and Desktop
4 Posts 2 Posters 1.6k Views 2 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.
  • M Offline
    M Offline
    michelson
    wrote on last edited by
    #1

    Hello,

    I want to completely disableBackButton in QWizard. Unfortunately I fail to do so...
    My Wizard setup looks like this

    • I have created some pages (as separate files)
    • I have created wizard (opts: NoBackButtonOnLastPage, NoBackButtonOnStartPage)
    • in wizards creator I am creating pages instances and call suitable setPage
    • (hide back somehow)
    • ...
    • profit?
      Or at least I would like these 3 last points to be right :) Do you have any ideas how to hide/delete this button?It is my first time using QWizard so I can miss something in the docs.
    1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi
      Have you tried with
      QAbstractButton * QWizard::button ( WizardButton which ) const
      and simply call hide() on it?

      alternatively i have also seen ppl using a custom layout and leave it out

      QListQWizard::WizardButton button_layout;
      button_layout << QWizard::HelpButton << QWizard::Stretch <<
      QWizard::NextButton << QWizard::CustomButton1 <<
      QWizard::CancelButton;
      this->setButtonLayout(button_layout);

      Also I must ask.:) Would a stackedwidget do just as fine as a wizard?

      1 Reply Last reply
      2
      • M Offline
        M Offline
        michelson
        wrote on last edited by
        #3

        Yep I have tried to hide() it but it does not word. It is strange because it does not hide button at all.
        Mayby it is coused by QWizard reseting these settings (showing all buttons) at each page switch (however I hide() the button in initializePage(int id))

        As I said it is my first time having to use some kind of wizard and since it is always called wizard i thought QWizard should do :) Ill try with StackedWidget if the layout fails to hide the button.

        1 Reply Last reply
        0
        • M Offline
          M Offline
          michelson
          wrote on last edited by
          #4

          setButtonLayout solved the issue. Thanks!

          1 Reply Last reply
          1

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved