Stylesheet Example
Using a stylesheet to customize a UI.
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 sets the application name and adds it to the page name and introduction text. - The
<Version>
element sets the application version number. - The
<Title>
element sets the installer name and displays it on the title bar. - The
<Publisher>
element sets the publisher of the software (as shown in the Windows Control Panel, for example). - The
<StartMenuDir>
element sets the name of the default program group for the product in the Windows Start menu. - The
<TargetDir>
element sets the default target directory location to be within theIfwExamples
directory in the home directory of the current user (because it uses the pre-existing variable,
@HomeDir@, as 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 macOS:
../../bin/binarycreator -c config/config.xml -p packages installer
This creates the installer to the current directory.
Files: