Stylesheet Example | Qt Installer Framework Manual

Qt Installer Framework Manual | Qt Installer Framework Examples | Stylesheet Example

# Stylesheet Example

Stylesheet demonstrates how to use a stylesheet to customize a wizard UI.

## Configuring the Example Installer

The installer configuration file, config.xml, in the `config` directory specifies the text and default values used in the installer:

- The `<Name>` element specifies the application name that is added to the page name and introduction text.
- The `<Version>` element specifies the application version number.
- The `<Title>` element specifies the installer name displayed on the title bar.
- The `<Publisher>` element specifies the publisher of the software (as shown in the Windows Control Panel, for example).
- The `<StartMenuDir>` element specifies the name of the default program group for the product in the Windows Start menu.
- The `<TargetDir>` element specifies that the default target directory is located in the `IfwExamples` directory in the home directory of the current user (because the predefined variable`@HomeDir@` is used as a part of the value). For more information, see Predefined Variables.

- The `<WizardStyle>` element sets the wizard style to be used.
- The `<StyleSheet>` element sets the stylesheet file.
- The `<TitleColor>` element sets the color of the titles and subtitles.

      <?xml version="1.0" encoding="UTF-8"?>
      <Installer>
          <Name>Stylesheet Example</Name>
          <Version>1.0.0</Version>
          <Title>Stylesheet Example</Title>
          <Publisher>Qt-Project</Publisher>
          <StartMenuDir>Qt IFW Examples</StartMenuDir>
          <TargetDir>@HomeDir@/IfwExamples/stylesheet</TargetDir>
          <WizardStyle>Classic</WizardStyle>
          <StyleSheet>style.qss</StyleSheet>
          <TitleColor>#FFFFFF</TitleColor>
      </Installer>

## Generating the Example Installer

To create the example installer, switch to the example source directory on the command line and enter the following command:

- On Windows:

        ..\..\bin\binarycreator.exe -c config\config.xml -p packages installer.exe

- On Linux or OS X:

        ../../bin/binarycreator -c config/config.xml -p packages installer

The installer is created in the current directory.

Files:

- stylesheet/config/config.xml
- stylesheet/packages/org.qtproject.ifw.example.stylesheet/meta/installscript.qs
- stylesheet/packages/org.qtproject.ifw.example.stylesheet/meta/package.xml
- stylesheet/stylesheet.pro