diff options
Diffstat (limited to 'examples/stylesheet')
6 files changed, 103 insertions, 0 deletions
diff --git a/examples/stylesheet/README b/examples/stylesheet/README new file mode 100644 index 000000000..ee0d445db --- /dev/null +++ b/examples/stylesheet/README @@ -0,0 +1,6 @@ +Shows how to customize a UI using stylesheet. + +Generate installer with + +binarycreator --offline-only -c config/config.xml -p packages installer + diff --git a/examples/stylesheet/config/config.xml b/examples/stylesheet/config/config.xml new file mode 100644 index 000000000..3cd8e6060 --- /dev/null +++ b/examples/stylesheet/config/config.xml @@ -0,0 +1,12 @@ +<?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> diff --git a/examples/stylesheet/config/style.qss b/examples/stylesheet/config/style.qss new file mode 100644 index 000000000..8d4f75d65 --- /dev/null +++ b/examples/stylesheet/config/style.qss @@ -0,0 +1,25 @@ +QWidget +{ + color: white; + background-color: rgb(65, 65, 65); +} + +QPushButton +{ + background: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 rgba(150, 150, 150, 60%), stop:1 rgba(50, 50, 50, 60%)); + border-color: rgb(60, 60, 60); + border-style: solid; + border-width: 2px; + border-radius: 9px; + min-height: 20px; + max-height: 20px; + min-width: 60px; + max-width: 60px; + padding-left: 15px; + padding-right: 15px; +} + +QPushButton:pressed, QPushButton:checked +{ + background: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 rgba(50, 50, 50, 60%), stop:1 rgba(150, 150, 150, 60%)); +} diff --git a/examples/stylesheet/packages/org.qtproject.ifw.example.stylesheet/meta/installscript.qs b/examples/stylesheet/packages/org.qtproject.ifw.example.stylesheet/meta/installscript.qs new file mode 100644 index 000000000..e99733ff3 --- /dev/null +++ b/examples/stylesheet/packages/org.qtproject.ifw.example.stylesheet/meta/installscript.qs @@ -0,0 +1,39 @@ +/************************************************************************** +** +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the Qt Installer Framework. +** +** $QT_BEGIN_LICENSE:LGPL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 or version 3 as published by the Free +** Software Foundation and appearing in the file LICENSE.LGPLv21 and +** LICENSE.LGPLv3 included in the packaging of this file. Please review the +** following information to ensure the GNU Lesser General Public License +** requirements will be met: https://www.gnu.org/licenses/lgpl.html and +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** As a special exception, The Qt Company gives you certain additional +** rights. These rights are described in The Qt Company LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** +** $QT_END_LICENSE$ +** +**************************************************************************/ + +function Component() +{ + // constructor + installer.setDefaultPageVisible(QInstaller.ComponentSelection, false); +} diff --git a/examples/stylesheet/packages/org.qtproject.ifw.example.stylesheet/meta/package.xml b/examples/stylesheet/packages/org.qtproject.ifw.example.stylesheet/meta/package.xml new file mode 100644 index 000000000..c0698a4e4 --- /dev/null +++ b/examples/stylesheet/packages/org.qtproject.ifw.example.stylesheet/meta/package.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Package> + <DisplayName>Dummy</DisplayName> + <ReleaseDate>2015-09-09</ReleaseDate> + <Version>1.0.1</Version> + <Default>true</Default> + <Script>installscript.qs</Script> +</Package> diff --git a/examples/stylesheet/stylesheet.pro b/examples/stylesheet/stylesheet.pro new file mode 100644 index 000000000..415df49d5 --- /dev/null +++ b/examples/stylesheet/stylesheet.pro @@ -0,0 +1,13 @@ +TEMPLATE = aux + +INSTALLER = installer + +INPUT = $$PWD/config/config.xml $$PWD/packages +example.input = INPUT +example.output = $$INSTALLER +example.commands = ../../bin/binarycreator -c $$PWD/config/config.xml -p $$PWD/packages ${QMAKE_FILE_OUT} +example.CONFIG += target_predeps no_link combine + +QMAKE_EXTRA_COMPILERS += example + +OTHER_FILES = README |