gui

Enables interaction with the installer UI. More...

Signals

Methods

Detailed Description

Signal Documentation

aboutApplicationClicked()

This signal is emitted when the about application menu and dialog on macOS are shown.

Note: The corresponding handler is onAboutApplicationClicked.


finishButtonClicked()

This signal is emitted when the Finish button is clicked.

Note: The corresponding handler is onFinishButtonClicked.


gotRestarted()

This signal is emitted when the installer is restarted.

Note: The corresponding handler is onGotRestarted.


interrupted()

This signal is emitted when the end user chooses to cancel the installation and quit the installer.

Note: The corresponding handler is onInterrupted.


languageChanged()

This signal is emitted when the application language changes.

Note: The corresponding handler is onLanguageChanged.


settingsButtonClicked()

This signal is emitted when the Settings button is clicked.

Note: The corresponding handler is onSettingsButtonClicked.


Method Documentation

void cancelButtonClicked()

Asks end users whether they want to cancel the operation and quit the installer, uninstaller, or package manager.


void clickButton(int wizardButton, int delayInMs)

Automatically clicks the button specified by wizardButton after a delay in milliseconds specified by delayInMs.


void clickButton(string objectName, int delayInMs)

Automatically clicks the button specified by objectName after a delay in milliseconds specified by delayInMs.


object currentPageWidget()

Returns the current wizard page.


string defaultButtonText(int wizardButton)

Returns the default text for the button specified by wizardButton.


object findChild(object parent, string objectName)

Returns the first descendant of parent that has objectName as name.

See also QObject::findChild.


object[] findChildren(object parent, string objectName)

Returns all descendants of parent that have objectName as name.

See also QObject::findChildren.


boolean isButtonEnabled(int wizardButton)

Returns true if the button specified by wizardButton is enabled. Returns false if a button of the specified type is not found.


object pageById(int id)

Returns the installer page specified by id. The values of id for the available installer pages are provided by QInstaller::WizardPage.


object pageByObjectName(string name)

Returns the installer page specified by name. The value of name is the object name set in the UI file that defines the installer page.


object pageWidgetByObjectName(string name)

For dynamic pages, returns the widget specified by name read from the UI file.


void reject()

Quits the installer, uninstaller, or package manager.


void rejectWithoutPrompt()

Quits the installer, uninstaller, or package manager without asking end users for confirmation.


void setSettingsButtonEnabled(boolean enable)

Enables the Settings button by setting enable to true.


void setTextItems(object control, stringlist items)

Updates the model of control (which must be a QComboBox or QAbstractItemView) such that it contains the given items.


void setWizardPageButtonText(int pageId, int buttonId, string buttonText)

Sets buttonText for button specified by buttonId to a installer page pageId.

Note: In some pages, installer will change the button text when entering the page. In that case, you need to connect to entered() -signal of the page to change the buttonText.

function Component()
{
    var page = gui.pageByObjectName("FinishedPage");
    page.entered.connect(Component.prototype.finishPageEntered);
}
Component.prototype.finishPageEntered = function()
{
    gui.setWizardPageButtonText(QInstaller.InstallationFinished, buttons.CommitButton, "Commit");
}

void showFinishedPage()

Shows the InstallationFinished page.


void showSettingsButton(boolean show)

Shows the Settings button if show is true. This function overrides the visibility of the Settings button in all pages. Be careful when showing the settings button so that users cannot change network settings while downloading data in the background. Changing the settings will restart the wizard and switch back to the introduction page.


© 2021 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. The Qt Company, Qt and their respective logos are trademarks of The Qt Company Ltd in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.