gui QML Type | Qt Installer Framework Documentation 4.10.0

- Qt Installer Framework Documentation
- Qt Installer Framework 4.10.0

# gui QML Type

Enables interaction with the installer UI. More...

Import Statement: | import scripting .

- List of all members, including inherited members

## Signals

- aboutApplicationClicked()
- currentPageChanged(int oldId, int newId)
- finishButtonClicked()
- gotRestarted()
- interrupted()
- languageChanged()
- settingsButtonClicked()

## Methods

- void cancelButtonClicked()
- void clickButton(int wizardButton, int delayInMs)
- void clickButton(string objectName, int delayInMs)
- object currentPageWidget()
- string defaultButtonText(int wizardButton)
- object findChild(object parent, string objectName)
- object[] findChildren(object parent, string objectName)
- boolean isButtonEnabled(int wizardButton)
- object pageById(int id)
- object pageByObjectName(string name)
- object pageWidgetByObjectName(string name)
- void reject()
- void rejectWithoutPrompt()
- void setSettingsButtonEnabled(boolean enable)
- void setTextItems(object control, stringlist items)
- void setWizardPageButtonText(int pageId, int buttonId, string buttonText)
- void showFinishedPage()
- void showSettingsButton(boolean show)

## Detailed Description

## Signal Documentation

aboutApplicationClicked()

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

currentPageChanged(int oldId, int newId)

This signal is emitted when the page transition from oldId to newId has been completed.

finishButtonClicked()

This signal is emitted when the Finish button is clicked.

gotRestarted()

This signal is emitted when the installer is restarted.

interrupted()

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

languageChanged()

This signal is emitted when the application language changes.

settingsButtonClicked()

This signal is emitted when the Settings button is clicked.

## 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.