mirror of
https://github.com/crystalidea/qt6windows7.git
synced 2025-07-03 15:55:27 +08:00
qt 6.5.1 original
This commit is contained in:
56
examples/embedded/styleexample/CMakeLists.txt
Normal file
56
examples/embedded/styleexample/CMakeLists.txt
Normal file
@ -0,0 +1,56 @@
|
||||
# Copyright (C) 2022 The Qt Company Ltd.
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
project(styleexample LANGUAGES CXX)
|
||||
|
||||
if(NOT DEFINED INSTALL_EXAMPLESDIR)
|
||||
set(INSTALL_EXAMPLESDIR "examples")
|
||||
endif()
|
||||
|
||||
set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/embedded/styleexample")
|
||||
|
||||
find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets)
|
||||
|
||||
qt_standard_project_setup()
|
||||
|
||||
qt_add_executable(styleexample
|
||||
main.cpp
|
||||
stylewidget.cpp stylewidget.h stylewidget.ui
|
||||
)
|
||||
|
||||
set_target_properties(styleexample PROPERTIES
|
||||
WIN32_EXECUTABLE TRUE
|
||||
MACOSX_BUNDLE TRUE
|
||||
)
|
||||
|
||||
target_link_libraries(styleexample PRIVATE
|
||||
Qt6::Core
|
||||
Qt6::Gui
|
||||
Qt6::Widgets
|
||||
)
|
||||
|
||||
# Resources:
|
||||
set(styleexample_resource_files
|
||||
"files/add.png"
|
||||
"files/application.qss"
|
||||
"files/blue.qss"
|
||||
"files/khaki.qss"
|
||||
"files/nature_1.jpg"
|
||||
"files/nostyle.qss"
|
||||
"files/remove.png"
|
||||
"files/transparent.qss"
|
||||
)
|
||||
|
||||
qt_add_resources(styleexample "styleexample"
|
||||
PREFIX
|
||||
"/"
|
||||
FILES
|
||||
${styleexample_resource_files}
|
||||
)
|
||||
|
||||
install(TARGETS styleexample
|
||||
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
|
||||
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
|
||||
LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
|
||||
)
|
BIN
examples/embedded/styleexample/files/add.png
Normal file
BIN
examples/embedded/styleexample/files/add.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.4 KiB |
125
examples/embedded/styleexample/files/application.qss
Normal file
125
examples/embedded/styleexample/files/application.qss
Normal file
@ -0,0 +1,125 @@
|
||||
QWidget#StyleWidget
|
||||
{
|
||||
background-color: none;
|
||||
background-image: url(icons:nature_1.jpg);
|
||||
}
|
||||
|
||||
QLabel, QAbstractButton
|
||||
{
|
||||
font: bold;
|
||||
color: beige;
|
||||
}
|
||||
|
||||
QAbstractButton
|
||||
{
|
||||
background: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 rgba(173,216,230,60%), stop:1 rgba(0,0,139,60%) );
|
||||
border-color: black;
|
||||
border-style: solid;
|
||||
border-width: 3px;
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
QAbstractButton:pressed, QAbstractButton:checked
|
||||
{
|
||||
background: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 rgba(0,0,139,60%), stop:1 rgba(173,216,230,60%) );
|
||||
}
|
||||
|
||||
QSpinBox {
|
||||
padding-left: 24px;
|
||||
padding-right: 24px;
|
||||
border-color: darkkhaki;
|
||||
border-style: solid;
|
||||
border-radius: 5;
|
||||
border-width: 3;
|
||||
}
|
||||
|
||||
QSpinBox::up-button
|
||||
{
|
||||
subcontrol-origin: padding;
|
||||
subcontrol-position: right; /* position at the top right corner */
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
border-width: 3px;
|
||||
|
||||
}
|
||||
|
||||
QSpinBox::up-arrow
|
||||
{
|
||||
image: url(icons:add.png);
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
}
|
||||
|
||||
|
||||
QSpinBox::down-button
|
||||
{
|
||||
subcontrol-origin: border;
|
||||
subcontrol-position: left;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
border-width: 3px;
|
||||
}
|
||||
|
||||
QSpinBox::down-arrow
|
||||
{
|
||||
image: url(icons:remove.png);
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
}
|
||||
|
||||
|
||||
QScrollBar:horizontal
|
||||
{
|
||||
border: 1px solid black;
|
||||
background: qlineargradient(x1:0, y1:0, x2:1, y2:0, stop:0 rgba(0,0,139,60%), stop:1 rgba(173,216,230,60%) );
|
||||
height: 15px;
|
||||
margin: 0px 20px 0 20px;
|
||||
}
|
||||
|
||||
QScrollBar::handle:horizontal
|
||||
{
|
||||
border: 1px solid black;
|
||||
background: rgba(0,0,139,60%);
|
||||
min-width: 20px;
|
||||
}
|
||||
|
||||
QScrollBar::add-line:horizontal
|
||||
{
|
||||
border: 1px solid black;
|
||||
background: rgba(0,0,139,60%);
|
||||
width: 20px;
|
||||
subcontrol-position: right;
|
||||
subcontrol-origin: margin;
|
||||
}
|
||||
|
||||
QScrollBar::sub-line:horizontal
|
||||
{
|
||||
border: 1px solid black;
|
||||
background: rgba(0,0,139,60%);
|
||||
width: 20px;
|
||||
subcontrol-position: left;
|
||||
subcontrol-origin: margin;
|
||||
}
|
||||
|
||||
QScrollBar:left-arrow:horizontal, QScrollBar::right-arrow:horizontal
|
||||
{
|
||||
border: none;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
}
|
||||
|
||||
QScrollBar:left-arrow:horizontal
|
||||
{
|
||||
image: url(icons:add.png)
|
||||
}
|
||||
|
||||
QScrollBar::right-arrow:horizontal
|
||||
{
|
||||
image: url(icons:remove.png)
|
||||
}
|
||||
|
||||
QScrollBar::add-page:horizontal, QScrollBar::sub-page:horizontal
|
||||
{
|
||||
background: none;
|
||||
}
|
||||
|
38
examples/embedded/styleexample/files/blue.qss
Normal file
38
examples/embedded/styleexample/files/blue.qss
Normal file
@ -0,0 +1,38 @@
|
||||
*
|
||||
{
|
||||
color: beige;
|
||||
}
|
||||
|
||||
QLabel, QAbstractButton
|
||||
{
|
||||
font: bold;
|
||||
color: yellow;
|
||||
}
|
||||
|
||||
QFrame
|
||||
{
|
||||
background-color: rgba(96,96,255,60%);
|
||||
border-color: rgb(32,32,196);
|
||||
border-width: 3px;
|
||||
border-style: solid;
|
||||
border-radius: 5;
|
||||
padding: 3px;
|
||||
}
|
||||
|
||||
QAbstractButton
|
||||
{
|
||||
background: qlineargradient(x1:0, y1:0, x2:0, y2:1,
|
||||
stop:0 lightblue, stop:0.5 darkblue);
|
||||
border-width: 3px;
|
||||
border-color: darkblue;
|
||||
border-style: solid;
|
||||
border-radius: 5;
|
||||
padding: 3px;
|
||||
}
|
||||
|
||||
QAbstractButton:pressed
|
||||
{
|
||||
background: qlineargradient(x1:0, y1:0, x2:0, y2:1,
|
||||
stop:0.5 darkblue, stop:1 lightblue);
|
||||
border-color: beige;
|
||||
}
|
99
examples/embedded/styleexample/files/khaki.qss
Normal file
99
examples/embedded/styleexample/files/khaki.qss
Normal file
@ -0,0 +1,99 @@
|
||||
|
||||
QWidget#StartScreen, QWidget#MainWidget {
|
||||
border: none;
|
||||
}
|
||||
|
||||
QWidget#StartScreen, .QFrame {
|
||||
background-color: beige;
|
||||
}
|
||||
|
||||
QPushButton, QToolButton {
|
||||
background-color: palegoldenrod;
|
||||
border-width: 2px;
|
||||
border-color: darkkhaki;
|
||||
border-style: solid;
|
||||
border-radius: 5;
|
||||
padding: 3px;
|
||||
/* min-width: 96px; */
|
||||
/* min-height: 48px; */
|
||||
}
|
||||
|
||||
QPushButton:hover, QToolButton:hover {
|
||||
background-color: khaki;
|
||||
}
|
||||
|
||||
QPushButton:pressed, QToolButton:pressed {
|
||||
padding-left: 5px;
|
||||
padding-top: 5px;
|
||||
background-color: #d0d67c;
|
||||
}
|
||||
|
||||
QLabel, QAbstractButton {
|
||||
font: italic "Times New Roman";
|
||||
}
|
||||
|
||||
QFrame, QLabel#title {
|
||||
border-width: 2px;
|
||||
padding: 1px;
|
||||
border-style: solid;
|
||||
border-color: darkkhaki;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
QFrame:focus {
|
||||
border-width: 3px;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
|
||||
QLabel {
|
||||
border: none;
|
||||
padding: 0;
|
||||
background: none;
|
||||
}
|
||||
|
||||
QLabel#title {
|
||||
font: 32px bold;
|
||||
}
|
||||
|
||||
QSpinBox {
|
||||
padding-left: 24px;
|
||||
padding-right: 24px;
|
||||
border-color: darkkhaki;
|
||||
border-style: solid;
|
||||
border-radius: 5;
|
||||
border-width: 3;
|
||||
}
|
||||
|
||||
QSpinBox::up-button
|
||||
{
|
||||
subcontrol-origin: padding;
|
||||
subcontrol-position: right; /* position at the top right corner */
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
border-width: 3px;
|
||||
border-image: url(:/files/spindownpng) 1;
|
||||
}
|
||||
|
||||
QSpinBox::up-arrow {
|
||||
image: url(:/files/add.png);
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
}
|
||||
|
||||
|
||||
QSpinBox::down-button
|
||||
{
|
||||
subcontrol-origin: border;
|
||||
subcontrol-position: left;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
border-width: 3px;
|
||||
border-image: url(:/files/spindownpng) 1;
|
||||
}
|
||||
|
||||
QSpinBox::down-arrow {
|
||||
image: url(:/files/remove.png);
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
}
|
BIN
examples/embedded/styleexample/files/nature_1.jpg
Normal file
BIN
examples/embedded/styleexample/files/nature_1.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 164 KiB |
0
examples/embedded/styleexample/files/nostyle.qss
Normal file
0
examples/embedded/styleexample/files/nostyle.qss
Normal file
BIN
examples/embedded/styleexample/files/remove.png
Normal file
BIN
examples/embedded/styleexample/files/remove.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 865 B |
139
examples/embedded/styleexample/files/transparent.qss
Normal file
139
examples/embedded/styleexample/files/transparent.qss
Normal file
@ -0,0 +1,139 @@
|
||||
QWidget#StyleWidget
|
||||
{
|
||||
background-color: none;
|
||||
background-image: url(:/files/nature_1.jpg);
|
||||
}
|
||||
|
||||
QLabel, QAbstractButton
|
||||
{
|
||||
color: beige;
|
||||
}
|
||||
|
||||
QFrame, QLabel#title {
|
||||
border-width: 2px;
|
||||
padding: 1px;
|
||||
border-style: solid;
|
||||
border-color: black;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
QFrame:focus {
|
||||
border-width: 3px;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
QAbstractButton
|
||||
{
|
||||
background: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 rgba(173,216,230,60%), stop:1 rgba(0,0,139,60%) );
|
||||
border-color: black;
|
||||
border-style: solid;
|
||||
border-width: 3px;
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
QAbstractButton:pressed, QAbstractButton:checked
|
||||
{
|
||||
background: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 rgba(0,0,139,60%), stop:1 rgba(173,216,230,60%) );
|
||||
}
|
||||
|
||||
QSpinBox {
|
||||
padding-left: 24px;
|
||||
padding-right: 24px;
|
||||
border-color: darkkhaki;
|
||||
border-style: solid;
|
||||
border-radius: 5;
|
||||
border-width: 3;
|
||||
}
|
||||
|
||||
QSpinBox::up-button
|
||||
{
|
||||
subcontrol-origin: padding;
|
||||
subcontrol-position: right; /* position at the top right corner */
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
border-width: 3px;
|
||||
|
||||
}
|
||||
|
||||
QSpinBox::up-arrow
|
||||
{
|
||||
image: url(:/files/add.png);
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
}
|
||||
|
||||
|
||||
QSpinBox::down-button
|
||||
{
|
||||
subcontrol-origin: border;
|
||||
subcontrol-position: left;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
border-width: 3px;
|
||||
}
|
||||
|
||||
QSpinBox::down-arrow
|
||||
{
|
||||
image: url(:/files/remove.png);
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
}
|
||||
|
||||
|
||||
QScrollBar:horizontal
|
||||
{
|
||||
border: 1px solid black;
|
||||
background: qlineargradient(x1:0, y1:0, x2:1, y2:0, stop:0 rgba(0,0,139,60%), stop:1 rgba(173,216,230,60%) );
|
||||
height: 15px;
|
||||
margin: 0px 20px 0 20px;
|
||||
}
|
||||
|
||||
QScrollBar::handle:horizontal
|
||||
{
|
||||
border: 1px solid black;
|
||||
background: rgba(0,0,139,60%);
|
||||
min-width: 20px;
|
||||
}
|
||||
|
||||
QScrollBar::add-line:horizontal
|
||||
{
|
||||
border: 1px solid black;
|
||||
background: rgba(0,0,139,60%);
|
||||
width: 20px;
|
||||
subcontrol-position: right;
|
||||
subcontrol-origin: margin;
|
||||
}
|
||||
|
||||
QScrollBar::sub-line:horizontal
|
||||
{
|
||||
border: 1px solid black;
|
||||
background: rgba(0,0,139,60%);
|
||||
width: 20px;
|
||||
subcontrol-position: left;
|
||||
subcontrol-origin: margin;
|
||||
}
|
||||
|
||||
QScrollBar:left-arrow:horizontal, QScrollBar::right-arrow:horizontal
|
||||
{
|
||||
border: none;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
}
|
||||
|
||||
QScrollBar:left-arrow:horizontal
|
||||
{
|
||||
image: url(:/files/add.png)
|
||||
}
|
||||
|
||||
QScrollBar::right-arrow:horizontal
|
||||
{
|
||||
image: url(:/files/remove.png)
|
||||
}
|
||||
|
||||
QScrollBar::add-page:horizontal, QScrollBar::sub-page:horizontal
|
||||
{
|
||||
background: none;
|
||||
}
|
||||
|
21
examples/embedded/styleexample/main.cpp
Normal file
21
examples/embedded/styleexample/main.cpp
Normal file
@ -0,0 +1,21 @@
|
||||
// Copyright (C) 2016 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
|
||||
#include <QApplication>
|
||||
|
||||
#include "stylewidget.h"
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
QApplication app(argc, argv);
|
||||
Q_INIT_RESOURCE(styleexample);
|
||||
|
||||
app.setApplicationName("style");
|
||||
app.setOrganizationName("QtProject");
|
||||
app.setOrganizationDomain("www.qt-project.org");
|
||||
|
||||
StyleWidget widget;
|
||||
widget.showFullScreen();
|
||||
|
||||
return app.exec();
|
||||
}
|
||||
|
9
examples/embedded/styleexample/styleexample.pro
Normal file
9
examples/embedded/styleexample/styleexample.pro
Normal file
@ -0,0 +1,9 @@
|
||||
QT += widgets
|
||||
|
||||
HEADERS += stylewidget.h
|
||||
FORMS += stylewidget.ui
|
||||
SOURCES += main.cpp stylewidget.cpp
|
||||
RESOURCES += styleexample.qrc
|
||||
|
||||
target.path = $$[QT_INSTALL_EXAMPLES]/embedded/styleexample
|
||||
INSTALLS += target
|
13
examples/embedded/styleexample/styleexample.qrc
Normal file
13
examples/embedded/styleexample/styleexample.qrc
Normal file
@ -0,0 +1,13 @@
|
||||
<!DOCTYPE RCC><RCC version="1.0">
|
||||
<qresource prefix="/">
|
||||
<file>files/add.png</file>
|
||||
<file>files/blue.qss</file>
|
||||
<file>files/khaki.qss</file>
|
||||
<file>files/nostyle.qss</file>
|
||||
<file>files/transparent.qss</file>
|
||||
<file>files/application.qss</file>
|
||||
<file>files/nature_1.jpg</file>
|
||||
<file>files/remove.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
74
examples/embedded/styleexample/stylewidget.cpp
Normal file
74
examples/embedded/styleexample/stylewidget.cpp
Normal file
@ -0,0 +1,74 @@
|
||||
// Copyright (C) 2016 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
|
||||
#include <QApplication>
|
||||
#include <QString>
|
||||
#include <QFile>
|
||||
|
||||
#include "stylewidget.h"
|
||||
|
||||
|
||||
|
||||
StyleWidget::StyleWidget(QWidget *parent)
|
||||
: QFrame(parent)
|
||||
{
|
||||
m_ui.setupUi(this);
|
||||
}
|
||||
|
||||
|
||||
void StyleWidget::on_close_clicked()
|
||||
{
|
||||
close();
|
||||
}
|
||||
|
||||
void StyleWidget::on_blueStyle_clicked()
|
||||
{
|
||||
QFile styleSheet(":/files/blue.qss");
|
||||
|
||||
if (!styleSheet.open(QIODevice::ReadOnly)) {
|
||||
qWarning("Unable to open :/files/blue.qss");
|
||||
return;
|
||||
}
|
||||
|
||||
qApp->setStyleSheet(styleSheet.readAll());
|
||||
}
|
||||
|
||||
void StyleWidget::on_khakiStyle_clicked()
|
||||
{
|
||||
QFile styleSheet(":/files/khaki.qss");
|
||||
|
||||
if (!styleSheet.open(QIODevice::ReadOnly)) {
|
||||
qWarning("Unable to open :/files/khaki.qss");
|
||||
return;
|
||||
}
|
||||
|
||||
qApp->setStyleSheet(styleSheet.readAll());
|
||||
}
|
||||
|
||||
|
||||
void StyleWidget::on_noStyle_clicked()
|
||||
{
|
||||
QFile styleSheet(":/files/nostyle.qss");
|
||||
|
||||
if (!styleSheet.open(QIODevice::ReadOnly)) {
|
||||
qWarning("Unable to open :/files/nostyle.qss");
|
||||
return;
|
||||
}
|
||||
|
||||
qApp->setStyleSheet(styleSheet.readAll());
|
||||
}
|
||||
|
||||
|
||||
void StyleWidget::on_transparentStyle_clicked()
|
||||
{
|
||||
QFile styleSheet(":/files/transparent.qss");
|
||||
|
||||
if (!styleSheet.open(QIODevice::ReadOnly)) {
|
||||
qWarning("Unable to open :/files/transparent.qss");
|
||||
return;
|
||||
}
|
||||
|
||||
qApp->setStyleSheet(styleSheet.readAll());
|
||||
}
|
||||
|
||||
|
||||
|
27
examples/embedded/styleexample/stylewidget.h
Normal file
27
examples/embedded/styleexample/stylewidget.h
Normal file
@ -0,0 +1,27 @@
|
||||
// Copyright (C) 2016 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
|
||||
#ifndef STYLEWIDGET_H
|
||||
#define STYLEWIDGET_H
|
||||
|
||||
#include <QFrame>
|
||||
|
||||
#include "ui_stylewidget.h"
|
||||
|
||||
class StyleWidget : public QFrame
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
StyleWidget(QWidget *parent = nullptr);
|
||||
|
||||
private:
|
||||
Ui_StyleWidget m_ui;
|
||||
|
||||
private slots:
|
||||
void on_close_clicked();
|
||||
void on_blueStyle_clicked();
|
||||
void on_khakiStyle_clicked();
|
||||
void on_noStyle_clicked();
|
||||
void on_transparentStyle_clicked();
|
||||
};
|
||||
|
||||
#endif
|
417
examples/embedded/styleexample/stylewidget.ui
Normal file
417
examples/embedded/styleexample/stylewidget.ui
Normal file
@ -0,0 +1,417 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>StyleWidget</class>
|
||||
<widget class="QWidget" name="StyleWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>184</width>
|
||||
<height>245</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0" colspan="2">
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="title">
|
||||
<string>Styles</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<property name="margin">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<property name="spacing">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QPushButton" name="transparentStyle">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Transp.</string>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="autoExclusive">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QPushButton" name="blueStyle">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Blue</string>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="autoExclusive">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QPushButton" name="khakiStyle">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Khaki</string>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="autoExclusive">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QPushButton" name="noStyle">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>None</string>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="autoExclusive">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" colspan="2">
|
||||
<spacer name="verticalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="2" column="0" colspan="2">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<property name="margin">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Value:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="spinBox">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::WheelFocus</enum>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="keyboardTracking">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QScrollBar" name="horizontalScrollBar">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>24</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::TabFocus</enum>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QScrollBar" name="horizontalScrollBar_2">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>24</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::TabFocus</enum>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QPushButton" name="pushButton_2">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Show</string>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="flat">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QPushButton" name="pushButton">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Enable</string>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="flat">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0" colspan="2">
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="6" column="0">
|
||||
<spacer>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="6" column="1">
|
||||
<widget class="QPushButton" name="close">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Close</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources>
|
||||
<include location="styleexample.qrc"/>
|
||||
</resources>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>horizontalScrollBar</sender>
|
||||
<signal>valueChanged(int)</signal>
|
||||
<receiver>horizontalScrollBar_2</receiver>
|
||||
<slot>setValue(int)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>84</x>
|
||||
<y>147</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>166</x>
|
||||
<y>147</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>horizontalScrollBar_2</sender>
|
||||
<signal>valueChanged(int)</signal>
|
||||
<receiver>horizontalScrollBar</receiver>
|
||||
<slot>setValue(int)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>166</x>
|
||||
<y>147</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>84</x>
|
||||
<y>147</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>pushButton</sender>
|
||||
<signal>clicked(bool)</signal>
|
||||
<receiver>horizontalScrollBar_2</receiver>
|
||||
<slot>setEnabled(bool)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>166</x>
|
||||
<y>175</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>166</x>
|
||||
<y>147</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>pushButton_2</sender>
|
||||
<signal>clicked(bool)</signal>
|
||||
<receiver>horizontalScrollBar</receiver>
|
||||
<slot>setVisible(bool)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>84</x>
|
||||
<y>175</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>84</x>
|
||||
<y>147</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>spinBox</sender>
|
||||
<signal>valueChanged(int)</signal>
|
||||
<receiver>horizontalScrollBar_2</receiver>
|
||||
<slot>setValue(int)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>166</x>
|
||||
<y>115</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>166</x>
|
||||
<y>147</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>horizontalScrollBar_2</sender>
|
||||
<signal>valueChanged(int)</signal>
|
||||
<receiver>spinBox</receiver>
|
||||
<slot>setValue(int)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>132</x>
|
||||
<y>132</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>135</x>
|
||||
<y>110</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
</ui>
|
Reference in New Issue
Block a user