0

I am trying to create an Introduction Page different from the preexisting one that Qt installer provides.

I created an ui file, disabled the Introduction page visibility in the control script and in the installscript constructor i created a new page and the reset the visibility to true. I followed the documentation, to the best of my ability and applied the insctructions this thread provided: QT Installer Framework: Add new wizard page before Introduction page The installer works but starts with the Target Directory Page straight away.

//controllerscript.qs

function Controller()
{
    installer.setDefaultPageVisible(QInstaller.Introduction, 0);
    installer.setDefaultPageVisible(QInstaller.ComponentSelection, 0);
    installer.setDefaultPageVisible(QInstaller.StartMenuSelection, 0);
}

//installscript.qs

function Component()
{
    installer.addWizardPage(component, "PreIntroPage", QInstaller.Introduction);
    if (installer.addWizardPage(component, "PreIntroPage", QInstaller.Introduction)) {
        var widget =gui.pageWidgetByObjectName("DynamicPreIntroPage");
        if (widget != null) {
             ...
        }
    }
}

The ui file's name is 'preintropage.ui' and i added it to the package.xml. The controllerscript is in the config.xml. This is supposed to create a new page before the introduction Page. Since i wanted to redesign the preexisting Introduction Page, add a picture(not only the logo), the callbackfunction, which worked, was not enough.

Is there something wrong with what I did? and is there another way to customize the Intro Page that is not limited to the text shown.

I am using the Qt installer Framework 3.1.0.

pandahs
  • 1
  • 2

1 Answers1

0

From what i understood that creating a new introduction page is not possible as "As custom pages can be loaded only when components are loaded. And Introduction page launched before any component could be loaded".

The best thing is to create an IntroductionPageCallback to change the text and add a watermark to add a picture of your software logo if needed. Qt installer framework installer, provided by Qt, also does this.

pandahs
  • 1
  • 2