Important: Please read the Qt Code of Conduct -

QtIFW 2.0 - How to add a custom wizard page from the controller script

  • Hi,

    I'm trying to create an installer that (optionally) installs a library in several different versions, each depending on a certain version of Qt (or more precise: the version of Qt and the target platform).

    In the control script I'm trying to create a custom wizard page where the user selects the directory of his Qt installazion. According to the documentation the following should work:

    function Controller()
        installer.addWizardPage(component, "MyCustomWizardPage", QInstaller.TargetDirectory)

    When I execute the installer it doesn't start and logs the message that 'component' is undefined. The examples all use a component script to add custom pages, and the API documentation says, that 'component' must be the component that registered the page.

    So my questions are:

    1. Does the example from the documentation work in any case or is it plain wrong?
    2. How do I add custom pages from the control script? Is that possible at all?
    3. All my components use the same component script (with a few exceptions) because the functionality must be the same no matter which component gets installed, so if I registered my custom page in it, it would be registered several times. Wouldn't that cause problems?

Log in to reply