2

I want to hide or freeze the back button on a page ( to be more specific, License Agreement Page). I tried editing control.qs with few methods but it doesn't seem to work. Following is one of them

Controller.prototype.LicenseAgreementPageCallback = function()
{
    var widget = gui.currentPageWidget();
    if (widget != null) 
    {
        widget.BackButton.setVisible(false) ;
    }
}
tle
  • 33
  • 7
  • I would like to know too! If it's really not possible, a workaround could be to auto-click next on the page before (based on some condition). – Felix Jan 30 '16 at 17:54
  • Thank for the idea. But I want it so that user cannot go back after that page. I will comment if I found a way to do that. – tle Feb 01 '16 at 02:07
  • Where can I find documentation for things like `widget.BackButton.setVisible(false) ;`? Specially the `setVisible` part. – KcFnMi Feb 23 '21 at 14:55

3 Answers3

0

I think you could try what I've proposed here: Qt installer framework: remove radio buttons from uninstaller. Even if it wasn't accepted, that what I used in my installer, so I'm pretty confident it's working!

Community
  • 1
  • 1
MBach
  • 1,647
  • 16
  • 30
0

I'm facing a similar problem trying to keep hide the Next button in the Target Directory page under certain conditions.

But your case may be easier:

1) You should use a global boolean variable set to true when you enter the License Agreement page.

2) When you enter the previous page test the value of this global: if true then force a click on the next page (gui.click(buttons.NextButton);).

Yes, it's a dirty workaround ;)

Dovydas Šopa
  • 2,282
  • 8
  • 26
  • 34
sassi67
  • 77
  • 1
  • 4
0

For the wizard BackButton specifically, it automatically disables itself if there are no pages before the current page a la the Introduction page.

From QtScript this can be accomplished by removing any dynamic pages before the current page with installer.removeWizardPage and disabling all default pages before the current page with installer.setDefaultPageVisible(QInstaller.Introduction, false).

Moose
  • 111
  • 3