summaryrefslogtreecommitdiffstats
path: root/examples/widgets/widgets/stylesheet
diff options
context:
space:
mode:
Diffstat (limited to 'examples/widgets/widgets/stylesheet')
-rw-r--r--examples/widgets/widgets/stylesheet/CMakeLists.txt88
-rw-r--r--examples/widgets/widgets/stylesheet/images/checkbox_checked.pngbin263 -> 0 bytes
-rw-r--r--examples/widgets/widgets/stylesheet/images/checkbox_checked_hover.pngbin266 -> 0 bytes
-rw-r--r--examples/widgets/widgets/stylesheet/images/checkbox_checked_pressed.pngbin425 -> 0 bytes
-rw-r--r--examples/widgets/widgets/stylesheet/images/checkbox_unchecked.pngbin159 -> 0 bytes
-rw-r--r--examples/widgets/widgets/stylesheet/images/checkbox_unchecked_hover.pngbin159 -> 0 bytes
-rw-r--r--examples/widgets/widgets/stylesheet/images/checkbox_unchecked_pressed.pngbin320 -> 0 bytes
-rw-r--r--examples/widgets/widgets/stylesheet/images/down_arrow.pngbin175 -> 0 bytes
-rw-r--r--examples/widgets/widgets/stylesheet/images/down_arrow_disabled.pngbin174 -> 0 bytes
-rw-r--r--examples/widgets/widgets/stylesheet/images/frame.pngbin253 -> 0 bytes
-rw-r--r--examples/widgets/widgets/stylesheet/images/pagefold.pngbin1545 -> 0 bytes
-rw-r--r--examples/widgets/widgets/stylesheet/images/pushbutton.pngbin533 -> 0 bytes
-rw-r--r--examples/widgets/widgets/stylesheet/images/pushbutton_hover.pngbin525 -> 0 bytes
-rw-r--r--examples/widgets/widgets/stylesheet/images/pushbutton_pressed.pngbin513 -> 0 bytes
-rw-r--r--examples/widgets/widgets/stylesheet/images/radiobutton_checked.pngbin355 -> 0 bytes
-rw-r--r--examples/widgets/widgets/stylesheet/images/radiobutton_checked_hover.pngbin532 -> 0 bytes
-rw-r--r--examples/widgets/widgets/stylesheet/images/radiobutton_checked_pressed.pngbin599 -> 0 bytes
-rw-r--r--examples/widgets/widgets/stylesheet/images/radiobutton_unchecked.pngbin240 -> 0 bytes
-rw-r--r--examples/widgets/widgets/stylesheet/images/radiobutton_unchecked_hover.pngbin492 -> 0 bytes
-rw-r--r--examples/widgets/widgets/stylesheet/images/radiobutton_unchecked_pressed.pngbin556 -> 0 bytes
-rw-r--r--examples/widgets/widgets/stylesheet/images/sizegrip.pngbin129 -> 0 bytes
-rw-r--r--examples/widgets/widgets/stylesheet/images/spindown.pngbin276 -> 0 bytes
-rw-r--r--examples/widgets/widgets/stylesheet/images/spindown_hover.pngbin268 -> 0 bytes
-rw-r--r--examples/widgets/widgets/stylesheet/images/spindown_off.pngbin249 -> 0 bytes
-rw-r--r--examples/widgets/widgets/stylesheet/images/spindown_pressed.pngbin264 -> 0 bytes
-rw-r--r--examples/widgets/widgets/stylesheet/images/spinup.pngbin283 -> 0 bytes
-rw-r--r--examples/widgets/widgets/stylesheet/images/spinup_hover.pngbin277 -> 0 bytes
-rw-r--r--examples/widgets/widgets/stylesheet/images/spinup_off.pngbin274 -> 0 bytes
-rw-r--r--examples/widgets/widgets/stylesheet/images/spinup_pressed.pngbin277 -> 0 bytes
-rw-r--r--examples/widgets/widgets/stylesheet/images/up_arrow.pngbin197 -> 0 bytes
-rw-r--r--examples/widgets/widgets/stylesheet/images/up_arrow_disabled.pngbin172 -> 0 bytes
-rw-r--r--examples/widgets/widgets/stylesheet/layouts/default.ui329
-rw-r--r--examples/widgets/widgets/stylesheet/layouts/pagefold.ui349
-rw-r--r--examples/widgets/widgets/stylesheet/main.cpp63
-rw-r--r--examples/widgets/widgets/stylesheet/mainwindow.cpp87
-rw-r--r--examples/widgets/widgets/stylesheet/mainwindow.h76
-rw-r--r--examples/widgets/widgets/stylesheet/mainwindow.ui356
-rw-r--r--examples/widgets/widgets/stylesheet/qss/coffee.qss112
-rw-r--r--examples/widgets/widgets/stylesheet/qss/default.qss1
-rw-r--r--examples/widgets/widgets/stylesheet/qss/pagefold.qss299
-rw-r--r--examples/widgets/widgets/stylesheet/stylesheet.pro15
-rw-r--r--examples/widgets/widgets/stylesheet/stylesheet.qrc39
-rw-r--r--examples/widgets/widgets/stylesheet/stylesheeteditor.cpp111
-rw-r--r--examples/widgets/widgets/stylesheet/stylesheeteditor.h77
-rw-r--r--examples/widgets/widgets/stylesheet/stylesheeteditor.ui171
45 files changed, 0 insertions, 2173 deletions
diff --git a/examples/widgets/widgets/stylesheet/CMakeLists.txt b/examples/widgets/widgets/stylesheet/CMakeLists.txt
deleted file mode 100644
index c88c7a8c8c..0000000000
--- a/examples/widgets/widgets/stylesheet/CMakeLists.txt
+++ /dev/null
@@ -1,88 +0,0 @@
-# Generated from stylesheet.pro.
-
-cmake_minimum_required(VERSION 3.16)
-project(stylesheet LANGUAGES CXX)
-
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
-
-set(CMAKE_AUTOMOC ON)
-set(CMAKE_AUTORCC ON)
-set(CMAKE_AUTOUIC ON)
-
-if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
-endif()
-
-set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/widgets/stylesheet")
-
-find_package(Qt6 COMPONENTS Core)
-find_package(Qt6 COMPONENTS Gui)
-find_package(Qt6 COMPONENTS Widgets)
-
-qt_add_executable(stylesheet
- main.cpp
- mainwindow.cpp mainwindow.h mainwindow.ui
- stylesheeteditor.cpp stylesheeteditor.h stylesheeteditor.ui
-)
-set_target_properties(stylesheet PROPERTIES
- WIN32_EXECUTABLE TRUE
- MACOSX_BUNDLE TRUE
-)
-target_link_libraries(stylesheet PUBLIC
- Qt::Core
- Qt::Gui
- Qt::Widgets
-)
-
-
-# Resources:
-set(stylesheet_resource_files
- "images/checkbox_checked.png"
- "images/checkbox_checked_hover.png"
- "images/checkbox_checked_pressed.png"
- "images/checkbox_unchecked.png"
- "images/checkbox_unchecked_hover.png"
- "images/checkbox_unchecked_pressed.png"
- "images/down_arrow.png"
- "images/down_arrow_disabled.png"
- "images/frame.png"
- "images/pagefold.png"
- "images/pushbutton.png"
- "images/pushbutton_hover.png"
- "images/pushbutton_pressed.png"
- "images/radiobutton_checked.png"
- "images/radiobutton_checked_hover.png"
- "images/radiobutton_checked_pressed.png"
- "images/radiobutton_unchecked.png"
- "images/radiobutton_unchecked_hover.png"
- "images/radiobutton_unchecked_pressed.png"
- "images/sizegrip.png"
- "images/spindown.png"
- "images/spindown_hover.png"
- "images/spindown_off.png"
- "images/spindown_pressed.png"
- "images/spinup.png"
- "images/spinup_hover.png"
- "images/spinup_off.png"
- "images/spinup_pressed.png"
- "images/up_arrow.png"
- "images/up_arrow_disabled.png"
- "layouts/default.ui"
- "layouts/pagefold.ui"
- "qss/coffee.qss"
- "qss/default.qss"
- "qss/pagefold.qss"
-)
-
-qt6_add_resources(stylesheet "stylesheet"
- PREFIX
- "/"
- FILES
- ${stylesheet_resource_files}
-)
-
-install(TARGETS stylesheet
- RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
- BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
- LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
-)
diff --git a/examples/widgets/widgets/stylesheet/images/checkbox_checked.png b/examples/widgets/widgets/stylesheet/images/checkbox_checked.png
deleted file mode 100644
index cbf06f6513..0000000000
--- a/examples/widgets/widgets/stylesheet/images/checkbox_checked.png
+++ /dev/null
Binary files differ
diff --git a/examples/widgets/widgets/stylesheet/images/checkbox_checked_hover.png b/examples/widgets/widgets/stylesheet/images/checkbox_checked_hover.png
deleted file mode 100644
index fb4d4d3fdb..0000000000
--- a/examples/widgets/widgets/stylesheet/images/checkbox_checked_hover.png
+++ /dev/null
Binary files differ
diff --git a/examples/widgets/widgets/stylesheet/images/checkbox_checked_pressed.png b/examples/widgets/widgets/stylesheet/images/checkbox_checked_pressed.png
deleted file mode 100644
index 852fcc0306..0000000000
--- a/examples/widgets/widgets/stylesheet/images/checkbox_checked_pressed.png
+++ /dev/null
Binary files differ
diff --git a/examples/widgets/widgets/stylesheet/images/checkbox_unchecked.png b/examples/widgets/widgets/stylesheet/images/checkbox_unchecked.png
deleted file mode 100644
index 5f5465582a..0000000000
--- a/examples/widgets/widgets/stylesheet/images/checkbox_unchecked.png
+++ /dev/null
Binary files differ
diff --git a/examples/widgets/widgets/stylesheet/images/checkbox_unchecked_hover.png b/examples/widgets/widgets/stylesheet/images/checkbox_unchecked_hover.png
deleted file mode 100644
index 687364497e..0000000000
--- a/examples/widgets/widgets/stylesheet/images/checkbox_unchecked_hover.png
+++ /dev/null
Binary files differ
diff --git a/examples/widgets/widgets/stylesheet/images/checkbox_unchecked_pressed.png b/examples/widgets/widgets/stylesheet/images/checkbox_unchecked_pressed.png
deleted file mode 100644
index 6a768c44de..0000000000
--- a/examples/widgets/widgets/stylesheet/images/checkbox_unchecked_pressed.png
+++ /dev/null
Binary files differ
diff --git a/examples/widgets/widgets/stylesheet/images/down_arrow.png b/examples/widgets/widgets/stylesheet/images/down_arrow.png
deleted file mode 100644
index 85004aeaf6..0000000000
--- a/examples/widgets/widgets/stylesheet/images/down_arrow.png
+++ /dev/null
Binary files differ
diff --git a/examples/widgets/widgets/stylesheet/images/down_arrow_disabled.png b/examples/widgets/widgets/stylesheet/images/down_arrow_disabled.png
deleted file mode 100644
index d9eefed4c8..0000000000
--- a/examples/widgets/widgets/stylesheet/images/down_arrow_disabled.png
+++ /dev/null
Binary files differ
diff --git a/examples/widgets/widgets/stylesheet/images/frame.png b/examples/widgets/widgets/stylesheet/images/frame.png
deleted file mode 100644
index 05a600502e..0000000000
--- a/examples/widgets/widgets/stylesheet/images/frame.png
+++ /dev/null
Binary files differ
diff --git a/examples/widgets/widgets/stylesheet/images/pagefold.png b/examples/widgets/widgets/stylesheet/images/pagefold.png
deleted file mode 100644
index 69be8f2a38..0000000000
--- a/examples/widgets/widgets/stylesheet/images/pagefold.png
+++ /dev/null
Binary files differ
diff --git a/examples/widgets/widgets/stylesheet/images/pushbutton.png b/examples/widgets/widgets/stylesheet/images/pushbutton.png
deleted file mode 100644
index c7529ba02d..0000000000
--- a/examples/widgets/widgets/stylesheet/images/pushbutton.png
+++ /dev/null
Binary files differ
diff --git a/examples/widgets/widgets/stylesheet/images/pushbutton_hover.png b/examples/widgets/widgets/stylesheet/images/pushbutton_hover.png
deleted file mode 100644
index af0ef9d561..0000000000
--- a/examples/widgets/widgets/stylesheet/images/pushbutton_hover.png
+++ /dev/null
Binary files differ
diff --git a/examples/widgets/widgets/stylesheet/images/pushbutton_pressed.png b/examples/widgets/widgets/stylesheet/images/pushbutton_pressed.png
deleted file mode 100644
index f7381f752a..0000000000
--- a/examples/widgets/widgets/stylesheet/images/pushbutton_pressed.png
+++ /dev/null
Binary files differ
diff --git a/examples/widgets/widgets/stylesheet/images/radiobutton_checked.png b/examples/widgets/widgets/stylesheet/images/radiobutton_checked.png
deleted file mode 100644
index 8ab9157578..0000000000
--- a/examples/widgets/widgets/stylesheet/images/radiobutton_checked.png
+++ /dev/null
Binary files differ
diff --git a/examples/widgets/widgets/stylesheet/images/radiobutton_checked_hover.png b/examples/widgets/widgets/stylesheet/images/radiobutton_checked_hover.png
deleted file mode 100644
index d68cb009a7..0000000000
--- a/examples/widgets/widgets/stylesheet/images/radiobutton_checked_hover.png
+++ /dev/null
Binary files differ
diff --git a/examples/widgets/widgets/stylesheet/images/radiobutton_checked_pressed.png b/examples/widgets/widgets/stylesheet/images/radiobutton_checked_pressed.png
deleted file mode 100644
index e3cd5a59e4..0000000000
--- a/examples/widgets/widgets/stylesheet/images/radiobutton_checked_pressed.png
+++ /dev/null
Binary files differ
diff --git a/examples/widgets/widgets/stylesheet/images/radiobutton_unchecked.png b/examples/widgets/widgets/stylesheet/images/radiobutton_unchecked.png
deleted file mode 100644
index 321a9a1558..0000000000
--- a/examples/widgets/widgets/stylesheet/images/radiobutton_unchecked.png
+++ /dev/null
Binary files differ
diff --git a/examples/widgets/widgets/stylesheet/images/radiobutton_unchecked_hover.png b/examples/widgets/widgets/stylesheet/images/radiobutton_unchecked_hover.png
deleted file mode 100644
index 666a3b0bdd..0000000000
--- a/examples/widgets/widgets/stylesheet/images/radiobutton_unchecked_hover.png
+++ /dev/null
Binary files differ
diff --git a/examples/widgets/widgets/stylesheet/images/radiobutton_unchecked_pressed.png b/examples/widgets/widgets/stylesheet/images/radiobutton_unchecked_pressed.png
deleted file mode 100644
index c4b0567aa9..0000000000
--- a/examples/widgets/widgets/stylesheet/images/radiobutton_unchecked_pressed.png
+++ /dev/null
Binary files differ
diff --git a/examples/widgets/widgets/stylesheet/images/sizegrip.png b/examples/widgets/widgets/stylesheet/images/sizegrip.png
deleted file mode 100644
index 350583aaac..0000000000
--- a/examples/widgets/widgets/stylesheet/images/sizegrip.png
+++ /dev/null
Binary files differ
diff --git a/examples/widgets/widgets/stylesheet/images/spindown.png b/examples/widgets/widgets/stylesheet/images/spindown.png
deleted file mode 100644
index 7ff3c64926..0000000000
--- a/examples/widgets/widgets/stylesheet/images/spindown.png
+++ /dev/null
Binary files differ
diff --git a/examples/widgets/widgets/stylesheet/images/spindown_hover.png b/examples/widgets/widgets/stylesheet/images/spindown_hover.png
deleted file mode 100644
index 1486c4dfe4..0000000000
--- a/examples/widgets/widgets/stylesheet/images/spindown_hover.png
+++ /dev/null
Binary files differ
diff --git a/examples/widgets/widgets/stylesheet/images/spindown_off.png b/examples/widgets/widgets/stylesheet/images/spindown_off.png
deleted file mode 100644
index a90ab3f038..0000000000
--- a/examples/widgets/widgets/stylesheet/images/spindown_off.png
+++ /dev/null
Binary files differ
diff --git a/examples/widgets/widgets/stylesheet/images/spindown_pressed.png b/examples/widgets/widgets/stylesheet/images/spindown_pressed.png
deleted file mode 100644
index f6271cbde2..0000000000
--- a/examples/widgets/widgets/stylesheet/images/spindown_pressed.png
+++ /dev/null
Binary files differ
diff --git a/examples/widgets/widgets/stylesheet/images/spinup.png b/examples/widgets/widgets/stylesheet/images/spinup.png
deleted file mode 100644
index 1069dd00df..0000000000
--- a/examples/widgets/widgets/stylesheet/images/spinup.png
+++ /dev/null
Binary files differ
diff --git a/examples/widgets/widgets/stylesheet/images/spinup_hover.png b/examples/widgets/widgets/stylesheet/images/spinup_hover.png
deleted file mode 100644
index 884c8d77c5..0000000000
--- a/examples/widgets/widgets/stylesheet/images/spinup_hover.png
+++ /dev/null
Binary files differ
diff --git a/examples/widgets/widgets/stylesheet/images/spinup_off.png b/examples/widgets/widgets/stylesheet/images/spinup_off.png
deleted file mode 100644
index 02dad1fb29..0000000000
--- a/examples/widgets/widgets/stylesheet/images/spinup_off.png
+++ /dev/null
Binary files differ
diff --git a/examples/widgets/widgets/stylesheet/images/spinup_pressed.png b/examples/widgets/widgets/stylesheet/images/spinup_pressed.png
deleted file mode 100644
index b1843e2a1f..0000000000
--- a/examples/widgets/widgets/stylesheet/images/spinup_pressed.png
+++ /dev/null
Binary files differ
diff --git a/examples/widgets/widgets/stylesheet/images/up_arrow.png b/examples/widgets/widgets/stylesheet/images/up_arrow.png
deleted file mode 100644
index e7f7ddb3a6..0000000000
--- a/examples/widgets/widgets/stylesheet/images/up_arrow.png
+++ /dev/null
Binary files differ
diff --git a/examples/widgets/widgets/stylesheet/images/up_arrow_disabled.png b/examples/widgets/widgets/stylesheet/images/up_arrow_disabled.png
deleted file mode 100644
index 4d2c27770f..0000000000
--- a/examples/widgets/widgets/stylesheet/images/up_arrow_disabled.png
+++ /dev/null
Binary files differ
diff --git a/examples/widgets/widgets/stylesheet/layouts/default.ui b/examples/widgets/widgets/stylesheet/layouts/default.ui
deleted file mode 100644
index 431a40956e..0000000000
--- a/examples/widgets/widgets/stylesheet/layouts/default.ui
+++ /dev/null
@@ -1,329 +0,0 @@
-<ui version="4.0" >
- <class>MainWindow</class>
- <widget class="QMainWindow" name="MainWindow" >
- <property name="geometry" >
- <rect>
- <x>0</x>
- <y>0</y>
- <width>388</width>
- <height>413</height>
- </rect>
- </property>
- <property name="windowTitle" >
- <string>MainWindow</string>
- </property>
- <widget class="QWidget" name="centralwidget" >
- <layout class="QGridLayout" >
- <property name="margin" >
- <number>9</number>
- </property>
- <property name="spacing" >
- <number>6</number>
- </property>
- <item row="0" column="0" >
- <widget class="QLabel" name="nameLabel" >
- <property name="text" >
- <string>&amp;Name:</string>
- </property>
- <property name="buddy" >
- <cstring>nameCombo</cstring>
- </property>
- </widget>
- </item>
- <item row="0" column="1" colspan="3" >
- <widget class="QComboBox" name="nameCombo" >
- <property name="toolTip" >
- <string>Specify your name</string>
- </property>
- <property name="editable" >
- <bool>true</bool>
- </property>
- <property name="currentIndex" >
- <number>-1</number>
- </property>
- <item>
- <property name="text" >
- <string>Girish</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Jasmin</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Simon</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Zack</string>
- </property>
- </item>
- </widget>
- </item>
- <item row="1" column="3" >
- <spacer>
- <property name="orientation" >
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" >
- <size>
- <width>40</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- <item row="1" column="2" >
- <widget class="QRadioButton" name="femaleRadioButton" >
- <property name="toolTip" >
- <string>Check this if you are female</string>
- </property>
- <property name="text" >
- <string>&amp;Female</string>
- </property>
- </widget>
- </item>
- <item row="6" column="0" colspan="4" >
- <widget class="QCheckBox" name="agreeCheckBox" >
- <property name="toolTip" >
- <string>Please read the license before checking this</string>
- </property>
- <property name="text" >
- <string>I &amp;accept the terms and conditions</string>
- </property>
- </widget>
- </item>
- <item row="1" column="1" >
- <widget class="QRadioButton" name="maleRadioButton" >
- <property name="toolTip" >
- <string>Check this if you are male</string>
- </property>
- <property name="text" >
- <string>&amp;Male</string>
- </property>
- </widget>
- </item>
- <item row="1" column="0" >
- <widget class="QLabel" name="genderLabel" >
- <property name="text" >
- <string>Gender:</string>
- </property>
- </widget>
- </item>
- <item row="2" column="1" colspan="3" >
- <widget class="QSpinBox" name="ageSpinBox" >
- <property name="toolTip" >
- <string>Specify your age</string>
- </property>
- <property name="statusTip" >
- <string>Specify your age here</string>
- </property>
- <property name="minimum" >
- <number>12</number>
- </property>
- <property name="value" >
- <number>22</number>
- </property>
- </widget>
- </item>
- <item row="7" column="2" colspan="2" >
- <widget class="QDialogButtonBox" name="buttonBox" >
- <property name="orientation" >
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="standardButtons" >
- <set>QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok</set>
- </property>
- </widget>
- </item>
- <item row="2" column="0" >
- <widget class="QLabel" name="ageLabel" >
- <property name="text" >
- <string>&amp;Age:</string>
- </property>
- <property name="buddy" >
- <cstring>ageSpinBox</cstring>
- </property>
- </widget>
- </item>
- <item row="3" column="0" >
- <widget class="QLabel" name="passwordLabel" >
- <property name="text" >
- <string>&amp;Password:</string>
- </property>
- <property name="buddy" >
- <cstring>passwordEdit</cstring>
- </property>
- </widget>
- </item>
- <item row="3" column="1" colspan="3" >
- <widget class="QLineEdit" name="passwordEdit" >
- <property name="toolTip" >
- <string>Specify your password</string>
- </property>
- <property name="statusTip" >
- <string>Specify your password here</string>
- </property>
- <property name="text" >
- <string>Password</string>
- </property>
- <property name="echoMode" >
- <enum>QLineEdit::Password</enum>
- </property>
- </widget>
- </item>
- <item row="5" column="0" >
- <widget class="QLabel" name="label" >
- <property name="text" >
- <string>Profession</string>
- </property>
- <property name="buddy" >
- <cstring>professionList</cstring>
- </property>
- </widget>
- </item>
- <item row="4" column="0" >
- <widget class="QLabel" name="countryLabel" >
- <property name="text" >
- <string>&amp;Country</string>
- </property>
- <property name="buddy" >
- <cstring>professionList</cstring>
- </property>
- </widget>
- </item>
- <item row="5" column="1" colspan="3" >
- <widget class="QListWidget" name="professionList" >
- <property name="toolTip" >
- <string>Select your profession</string>
- </property>
- <property name="statusTip" >
- <string>Select your profession</string>
- </property>
- <property name="whatsThis" >
- <string>Select your profession</string>
- </property>
- <property name="currentRow" >
- <number>1</number>
- </property>
- <item>
- <property name="text" >
- <string>Developer</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Student</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Fisherman</string>
- </property>
- </item>
- </widget>
- </item>
- <item row="4" column="1" colspan="3" >
- <widget class="QComboBox" name="countryCombo" >
- <property name="toolTip" >
- <string>Specify your country</string>
- </property>
- <property name="statusTip" >
- <string>Specify your country here</string>
- </property>
- <property name="currentIndex" >
- <number>2</number>
- </property>
- <item>
- <property name="text" >
- <string>Germany</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>India</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Norway</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>United States Of America</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>United Kingdom</string>
- </property>
- </item>
- </widget>
- </item>
- </layout>
- </widget>
- <widget class="QMenuBar" name="menubar" >
- <property name="geometry" >
- <rect>
- <x>0</x>
- <y>0</y>
- <width>388</width>
- <height>21</height>
- </rect>
- </property>
- <widget class="QMenu" name="menu_File" >
- <property name="title" >
- <string>&amp;File</string>
- </property>
- <addaction name="editStyleAction" />
- <addaction name="separator" />
- <addaction name="exitAction" />
- </widget>
- <widget class="QMenu" name="menu_Help" >
- <property name="title" >
- <string>&amp;Help</string>
- </property>
- <addaction name="aboutAction" />
- <addaction name="separator" />
- <addaction name="aboutQtAction" />
- </widget>
- <addaction name="menu_File" />
- <addaction name="menu_Help" />
- </widget>
- <widget class="QStatusBar" name="statusbar" />
- <action name="exitAction" >
- <property name="text" >
- <string>&amp;Exit</string>
- </property>
- </action>
- <action name="aboutQtAction" >
- <property name="text" >
- <string>About Qt</string>
- </property>
- </action>
- <action name="editStyleAction" >
- <property name="text" >
- <string>Edit &amp;Style</string>
- </property>
- </action>
- <action name="aboutAction" >
- <property name="text" >
- <string>About</string>
- </property>
- </action>
- </widget>
- <tabstops>
- <tabstop>maleRadioButton</tabstop>
- <tabstop>femaleRadioButton</tabstop>
- <tabstop>ageSpinBox</tabstop>
- <tabstop>passwordEdit</tabstop>
- <tabstop>professionList</tabstop>
- <tabstop>agreeCheckBox</tabstop>
- </tabstops>
- <resources/>
- <connections/>
-</ui>
diff --git a/examples/widgets/widgets/stylesheet/layouts/pagefold.ui b/examples/widgets/widgets/stylesheet/layouts/pagefold.ui
deleted file mode 100644
index 7ae313c331..0000000000
--- a/examples/widgets/widgets/stylesheet/layouts/pagefold.ui
+++ /dev/null
@@ -1,349 +0,0 @@
-<ui version="4.0" >
- <class>MainWindow</class>
- <widget class="QMainWindow" name="MainWindow" >
- <property name="geometry" >
- <rect>
- <x>0</x>
- <y>0</y>
- <width>392</width>
- <height>412</height>
- </rect>
- </property>
- <property name="windowTitle" >
- <string>MainWindow</string>
- </property>
- <widget class="QWidget" name="centralwidget" >
- <layout class="QVBoxLayout" >
- <property name="margin" >
- <number>9</number>
- </property>
- <property name="spacing" >
- <number>6</number>
- </property>
- <item>
- <widget class="QFrame" name="mainFrame" >
- <property name="frameShape" >
- <enum>QFrame::StyledPanel</enum>
- </property>
- <property name="frameShadow" >
- <enum>QFrame::Raised</enum>
- </property>
- <layout class="QGridLayout" >
- <property name="margin" >
- <number>9</number>
- </property>
- <property name="spacing" >
- <number>6</number>
- </property>
- <item row="0" column="1" colspan="3" >
- <widget class="QComboBox" name="nameCombo" >
- <property name="toolTip" >
- <string>Specify your name</string>
- </property>
- <property name="editable" >
- <bool>true</bool>
- </property>
- <property name="currentIndex" >
- <number>-1</number>
- </property>
- <item>
- <property name="text" >
- <string>Girish</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Jasmin</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Simon</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Zack</string>
- </property>
- </item>
- </widget>
- </item>
- <item row="1" column="3" >
- <spacer>
- <property name="orientation" >
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" >
- <size>
- <width>40</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- <item row="1" column="2" >
- <widget class="QRadioButton" name="femaleRadioButton" >
- <property name="styleSheet" >
- <string>Check this if you are female</string>
- </property>
- <property name="text" >
- <string>&amp;Female</string>
- </property>
- </widget>
- </item>
- <item row="1" column="0" >
- <widget class="QLabel" name="genderLabel" >
- <property name="text" >
- <string>Gender:</string>
- </property>
- </widget>
- </item>
- <item row="2" column="0" >
- <widget class="QLabel" name="ageLabel" >
- <property name="text" >
- <string>&amp;Age:</string>
- </property>
- <property name="buddy" >
- <cstring>ageSpinBox</cstring>
- </property>
- </widget>
- </item>
- <item row="1" column="1" >
- <widget class="QRadioButton" name="maleRadioButton" >
- <property name="toolTip" >
- <string>Check this if you are male</string>
- </property>
- <property name="text" >
- <string>&amp;Male</string>
- </property>
- </widget>
- </item>
- <item row="0" column="0" >
- <widget class="QLabel" name="nameLabel" >
- <property name="text" >
- <string>&amp;Name:</string>
- </property>
- <property name="buddy" >
- <cstring>nameCombo</cstring>
- </property>
- </widget>
- </item>
- <item row="3" column="0" >
- <widget class="QLabel" name="passwordLabel" >
- <property name="text" >
- <string>&amp;Password:</string>
- </property>
- <property name="buddy" >
- <cstring>passwordEdit</cstring>
- </property>
- </widget>
- </item>
- <item row="2" column="1" colspan="3" >
- <widget class="QSpinBox" name="ageSpinBox" >
- <property name="toolTip" >
- <string>Specify your age</string>
- </property>
- <property name="statusTip" >
- <string>Specify your age</string>
- </property>
- <property name="minimum" >
- <number>12</number>
- </property>
- <property name="value" >
- <number>22</number>
- </property>
- </widget>
- </item>
- <item row="7" column="2" colspan="2" >
- <widget class="QDialogButtonBox" name="buttonBox" >
- <property name="orientation" >
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="standardButtons" >
- <set>QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok</set>
- </property>
- </widget>
- </item>
- <item row="6" column="0" colspan="4" >
- <widget class="QCheckBox" name="agreeCheckBox" >
- <property name="toolTip" >
- <string>Please read the LICENSE file before checking</string>
- </property>
- <property name="text" >
- <string>I &amp;accept the terms and &amp;conditions</string>
- </property>
- </widget>
- </item>
- <item row="3" column="1" colspan="3" >
- <widget class="QLineEdit" name="passwordEdit" >
- <property name="toolTip" >
- <string>Specify your password</string>
- </property>
- <property name="statusTip" >
- <string>Specify your password</string>
- </property>
- <property name="text" >
- <string>Password</string>
- </property>
- <property name="echoMode" >
- <enum>QLineEdit::Password</enum>
- </property>
- </widget>
- </item>
- <item row="5" column="1" colspan="3" >
- <widget class="QListWidget" name="professionList" >
- <property name="toolTip" >
- <string>Select your profession</string>
- </property>
- <property name="statusTip" >
- <string>Specify your name here</string>
- </property>
- <property name="whatsThis" >
- <string>Specify your name here</string>
- </property>
- <property name="currentRow" >
- <number>0</number>
- </property>
- <item>
- <property name="text" >
- <string>Developer</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Student</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Fisherman</string>
- </property>
- </item>
- </widget>
- </item>
- <item row="5" column="0" >
- <widget class="QLabel" name="label" >
- <property name="text" >
- <string>Profession:</string>
- </property>
- <property name="buddy" >
- <cstring>professionList</cstring>
- </property>
- </widget>
- </item>
- <item row="4" column="1" colspan="3" >
- <widget class="QComboBox" name="countryCombo" >
- <property name="toolTip" >
- <string>Specify country of origin</string>
- </property>
- <property name="statusTip" >
- <string>Specify country of origin</string>
- </property>
- <property name="currentIndex" >
- <number>6</number>
- </property>
- <item>
- <property name="text" >
- <string>Egypt</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>France</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Germany</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>India</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Italy</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Korea</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Norway</string>
- </property>
- </item>
- </widget>
- </item>
- <item row="4" column="0" >
- <widget class="QLabel" name="countryLabel" >
- <property name="text" >
- <string>Pro&amp;fession</string>
- </property>
- <property name="buddy" >
- <cstring>professionList</cstring>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- </layout>
- </widget>
- <widget class="QMenuBar" name="menubar" >
- <property name="geometry" >
- <rect>
- <x>0</x>
- <y>0</y>
- <width>392</width>
- <height>25</height>
- </rect>
- </property>
- <widget class="QMenu" name="menu_File" >
- <property name="title" >
- <string>&amp;File</string>
- </property>
- <addaction name="editStyleAction" />
- <addaction name="separator" />
- <addaction name="exitAction" />
- </widget>
- <widget class="QMenu" name="menu_Help" >
- <property name="title" >
- <string>&amp;Help</string>
- </property>
- <addaction name="aboutAction" />
- <addaction name="separator" />
- <addaction name="aboutQtAction" />
- </widget>
- <addaction name="menu_File" />
- <addaction name="menu_Help" />
- </widget>
- <widget class="QStatusBar" name="statusbar" />
- <action name="exitAction" >
- <property name="text" >
- <string>&amp;Exit</string>
- </property>
- </action>
- <action name="aboutQtAction" >
- <property name="text" >
- <string>About Qt</string>
- </property>
- </action>
- <action name="editStyleAction" >
- <property name="text" >
- <string>Edit &amp;Style</string>
- </property>
- </action>
- <action name="aboutAction" >
- <property name="text" >
- <string>About</string>
- </property>
- </action>
- </widget>
- <resources/>
- <connections/>
-</ui>
diff --git a/examples/widgets/widgets/stylesheet/main.cpp b/examples/widgets/widgets/stylesheet/main.cpp
deleted file mode 100644
index 3b1168398a..0000000000
--- a/examples/widgets/widgets/stylesheet/main.cpp
+++ /dev/null
@@ -1,63 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include <QApplication>
-
-#include "mainwindow.h"
-
-int main(int argc, char *argv[])
-{
- Q_INIT_RESOURCE(stylesheet);
-
- QApplication app(argc, argv);
- MainWindow window;
- window.show();
- return app.exec();
-}
diff --git a/examples/widgets/widgets/stylesheet/mainwindow.cpp b/examples/widgets/widgets/stylesheet/mainwindow.cpp
deleted file mode 100644
index 6e7bb295e1..0000000000
--- a/examples/widgets/widgets/stylesheet/mainwindow.cpp
+++ /dev/null
@@ -1,87 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "mainwindow.h"
-#include "stylesheeteditor.h"
-
-#include <QMessageBox>
-
-MainWindow::MainWindow(QWidget *parent)
- : QMainWindow(parent)
-{
- ui.setupUi(this);
-
- ui.nameLabel->setProperty("class", "mandatory QLabel");
-
- styleSheetEditor = new StyleSheetEditor(this);
-
- statusBar()->addWidget(new QLabel(tr("Ready")));
-
- connect(ui.exitAction, &QAction::triggered, qApp, &QApplication::quit);
- connect(ui.aboutQtAction, &QAction::triggered, qApp, &QApplication::aboutQt);
-}
-
-void MainWindow::on_editStyleAction_triggered()
-{
- styleSheetEditor->show();
- styleSheetEditor->activateWindow();
-}
-
-void MainWindow::on_aboutAction_triggered()
-{
- const QString url = QStringLiteral("http://doc.qt.io/qt-%1/stylesheet.html")
- .arg(QT_VERSION_MAJOR);
- QMessageBox::about(this, tr("About Style sheet"),
- tr("The <b>Style Sheet</b> example shows how widgets can be styled "
- "using <a href=\"%1\">Qt "
- "Style Sheets</a>. Click <b>File|Edit Style Sheet</b> to pop up the "
- "style editor, and either choose an existing style sheet or design "
- "your own.").arg(url));
-}
diff --git a/examples/widgets/widgets/stylesheet/mainwindow.h b/examples/widgets/widgets/stylesheet/mainwindow.h
deleted file mode 100644
index ba979a3881..0000000000
--- a/examples/widgets/widgets/stylesheet/mainwindow.h
+++ /dev/null
@@ -1,76 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef MAINWINDOW_H
-#define MAINWINDOW_H
-
-#include <QMainWindow>
-
-#include "ui_mainwindow.h"
-
-class StyleSheetEditor;
-
-class MainWindow : public QMainWindow
-{
- Q_OBJECT
-
-public:
- MainWindow(QWidget *parent = nullptr);
-
-private slots:
- void on_editStyleAction_triggered();
- void on_aboutAction_triggered();
-
-private:
- StyleSheetEditor *styleSheetEditor;
- Ui::MainWindow ui;
-};
-
-#endif
diff --git a/examples/widgets/widgets/stylesheet/mainwindow.ui b/examples/widgets/widgets/stylesheet/mainwindow.ui
deleted file mode 100644
index cc29257afb..0000000000
--- a/examples/widgets/widgets/stylesheet/mainwindow.ui
+++ /dev/null
@@ -1,356 +0,0 @@
-<ui version="4.0" >
- <class>MainWindow</class>
- <widget class="QMainWindow" name="MainWindow" >
- <property name="geometry" >
- <rect>
- <x>0</x>
- <y>0</y>
- <width>400</width>
- <height>413</height>
- </rect>
- </property>
- <property name="windowTitle" >
- <string>Style Sheet</string>
- </property>
- <widget class="QWidget" name="centralwidget" >
- <layout class="QVBoxLayout" >
- <property name="margin" >
- <number>9</number>
- </property>
- <property name="spacing" >
- <number>6</number>
- </property>
- <item>
- <widget class="QFrame" name="mainFrame" >
- <property name="frameShape" >
- <enum>QFrame::StyledPanel</enum>
- </property>
- <property name="frameShadow" >
- <enum>QFrame::Raised</enum>
- </property>
- <layout class="QGridLayout" >
- <property name="margin" >
- <number>9</number>
- </property>
- <property name="spacing" >
- <number>6</number>
- </property>
- <item row="6" column="0" colspan="5" >
- <widget class="QCheckBox" name="agreeCheckBox" >
- <property name="toolTip" >
- <string>Please read the LICENSE file before checking</string>
- </property>
- <property name="text" >
- <string>I accept the terms and &amp;conditions</string>
- </property>
- </widget>
- </item>
- <item row="5" column="0" >
- <widget class="QLabel" name="label" >
- <property name="text" >
- <string>Profession:</string>
- </property>
- <property name="alignment" >
- <set>Qt::AlignRight|Qt::AlignTop|Qt::AlignTrailing</set>
- </property>
- <property name="buddy" >
- <cstring>professionList</cstring>
- </property>
- </widget>
- </item>
- <item row="0" column="0" >
- <widget class="QLabel" name="nameLabel" >
- <property name="text" >
- <string>&amp;Name:</string>
- </property>
- <property name="alignment" >
- <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
- </property>
- <property name="buddy" >
- <cstring>nameCombo</cstring>
- </property>
- </widget>
- </item>
- <item row="1" column="1" >
- <widget class="QRadioButton" name="maleRadioButton" >
- <property name="toolTip" >
- <string>Check this if you are male</string>
- </property>
- <property name="text" >
- <string>&amp;Male</string>
- </property>
- </widget>
- </item>
- <item row="3" column="0" >
- <widget class="QLabel" name="passwordLabel" >
- <property name="text" >
- <string>&amp;Password:</string>
- </property>
- <property name="alignment" >
- <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
- </property>
- <property name="buddy" >
- <cstring>passwordEdit</cstring>
- </property>
- </widget>
- </item>
- <item row="4" column="1" colspan="4" >
- <widget class="QComboBox" name="countryCombo" >
- <property name="toolTip" >
- <string>Specify country of origin</string>
- </property>
- <property name="statusTip" >
- <string>Specify country of origin</string>
- </property>
- <property name="currentIndex" >
- <number>6</number>
- </property>
- <item>
- <property name="text" >
- <string>Egypt</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>France</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Germany</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>India</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Italy</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Norway</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Pakistan</string>
- </property>
- </item>
- </widget>
- </item>
- <item row="2" column="0" >
- <widget class="QLabel" name="ageLabel" >
- <property name="text" >
- <string>&amp;Age:</string>
- </property>
- <property name="alignment" >
- <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
- </property>
- <property name="buddy" >
- <cstring>ageSpinBox</cstring>
- </property>
- </widget>
- </item>
- <item row="4" column="0" >
- <widget class="QLabel" name="countryLabel" >
- <property name="text" >
- <string>Country:</string>
- </property>
- <property name="alignment" >
- <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
- </property>
- <property name="buddy" >
- <cstring>countryCombo</cstring>
- </property>
- </widget>
- </item>
- <item row="1" column="0" >
- <widget class="QLabel" name="genderLabel" >
- <property name="text" >
- <string>Gender:</string>
- </property>
- <property name="alignment" >
- <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
- </property>
- </widget>
- </item>
- <item row="3" column="1" colspan="4" >
- <widget class="QLineEdit" name="passwordEdit" >
- <property name="toolTip" >
- <string>Specify your password</string>
- </property>
- <property name="statusTip" >
- <string>Specify your password</string>
- </property>
- <property name="text" >
- <string>Password</string>
- </property>
- <property name="echoMode" >
- <enum>QLineEdit::Password</enum>
- </property>
- </widget>
- </item>
- <item row="1" column="2" colspan="2" >
- <widget class="QRadioButton" name="femaleRadioButton" >
- <property name="toolTip">
- <string>Check this if you are female</string>
- </property>
- <property name="text" >
- <string>&amp;Female</string>
- </property>
- </widget>
- </item>
- <item row="2" column="1" colspan="2" >
- <widget class="QSpinBox" name="ageSpinBox" >
- <property name="toolTip" >
- <string>Specify your age</string>
- </property>
- <property name="statusTip" >
- <string>Specify your age</string>
- </property>
- <property name="minimum" >
- <number>12</number>
- </property>
- <property name="value" >
- <number>22</number>
- </property>
- </widget>
- </item>
- <item row="0" column="1" colspan="4" >
- <widget class="QComboBox" name="nameCombo" >
- <property name="toolTip" >
- <string>Specify your name</string>
- </property>
- <property name="editable" >
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item row="1" column="4" >
- <spacer>
- <property name="orientation" >
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" >
- <size>
- <width>40</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- <item row="2" column="3" colspan="2" >
- <spacer>
- <property name="orientation" >
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" >
- <size>
- <width>61</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- <item row="7" column="3" colspan="2" >
- <widget class="QDialogButtonBox" name="buttonBox" >
- <property name="orientation" >
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="standardButtons" >
- <set>QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok</set>
- </property>
- </widget>
- </item>
- <item row="5" column="1" colspan="4" >
- <widget class="QListWidget" name="professionList" >
- <property name="toolTip" >
- <string>Select your profession</string>
- </property>
- <property name="statusTip" >
- <string>Specify your name here</string>
- </property>
- <property name="whatsThis" >
- <string>Specify your name here</string>
- </property>
- <property name="currentRow" >
- <number>0</number>
- </property>
- <item>
- <property name="text" >
- <string>Developer</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Student</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Fisherman</string>
- </property>
- </item>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- </layout>
- </widget>
- <widget class="QMenuBar" name="menubar" >
- <property name="geometry" >
- <rect>
- <x>0</x>
- <y>0</y>
- <width>400</width>
- <height>29</height>
- </rect>
- </property>
- <widget class="QMenu" name="menu_File" >
- <property name="title" >
- <string>&amp;File</string>
- </property>
- <addaction name="editStyleAction" />
- <addaction name="separator" />
- <addaction name="exitAction" />
- </widget>
- <widget class="QMenu" name="menu_Help" >
- <property name="title" >
- <string>&amp;Help</string>
- </property>
- <addaction name="aboutAction" />
- <addaction name="aboutQtAction" />
- </widget>
- <addaction name="menu_File" />
- <addaction name="menu_Help" />
- </widget>
- <widget class="QStatusBar" name="statusbar" />
- <action name="exitAction" >
- <property name="text" >
- <string>&amp;Exit</string>
- </property>
- </action>
- <action name="aboutQtAction" >
- <property name="text" >
- <string>About Qt</string>
- </property>
- </action>
- <action name="editStyleAction" >
- <property name="text" >
- <string>Edit &amp;Style...</string>
- </property>
- </action>
- <action name="aboutAction" >
- <property name="text" >
- <string>About</string>
- </property>
- </action>
- </widget>
- <resources/>
- <connections/>
-</ui>
diff --git a/examples/widgets/widgets/stylesheet/qss/coffee.qss b/examples/widgets/widgets/stylesheet/qss/coffee.qss
deleted file mode 100644
index 4571d42d7e..0000000000
--- a/examples/widgets/widgets/stylesheet/qss/coffee.qss
+++ /dev/null
@@ -1,112 +0,0 @@
-.QWidget {
- background-color: beige;
-}
-
-/* Nice Windows-XP-style password character. */
-QLineEdit[echoMode="2"] {
- lineedit-password-character: 9679;
-}
-
-/* We provide a min-width and min-height for push buttons
- so that they look elegant regardless of the width of the text. */
-QPushButton {
- background-color: palegoldenrod;
- border-width: 2px;
- border-color: darkkhaki;
- border-style: solid;
- border-radius: 5;
- padding: 3px;
- min-width: 9ex;
- min-height: 2.5ex;
-}
-
-QPushButton:hover {
- background-color: khaki;
-}
-
-/* Increase the padding, so the text is shifted when the button is
- pressed. */
-QPushButton:pressed {
- padding-left: 5px;
- padding-top: 5px;
- background-color: #d0d67c;
-}
-
-QLabel, QAbstractButton {
- font: bold;
-}
-
-/* Mark mandatory fields with a brownish color. */
-.mandatory {
- color: brown;
-}
-
-/* Bold text on status bar looks awful. */
-QStatusBar QLabel {
- font: normal;
-}
-
-QStatusBar::item {
- border-width: 1;
- border-color: darkkhaki;
- border-style: solid;
- border-radius: 2;
-}
-
-QComboBox, QLineEdit, QSpinBox, QTextEdit, QListView {
- background-color: cornsilk;
- selection-color: #0a214c;
- selection-background-color: #C19A6B;
-}
-
-QListView {
- show-decoration-selected: 1;
-}
-
-QListView::item:hover {
- background-color: wheat;
-}
-
-/* We reserve 1 pixel space in padding. When we get the focus,
- we kill the padding and enlarge the border. This makes the items
- glow. */
-QLineEdit, QFrame {
- border-width: 2px;
- padding: 1px;
- border-style: solid;
- border-color: darkkhaki;
- border-radius: 5px;
-}
-
-/* As mentioned above, eliminate the padding and increase the border. */
-QLineEdit:focus, QFrame:focus {
- border-width: 3px;
- padding: 0px;
-}
-
-/* A QLabel is a QFrame ... */
-QLabel {
- border: none;
- padding: 0;
- background: none;
-}
-
-/* A QToolTip is a QLabel ... */
-QToolTip {
- border: 2px solid darkkhaki;
- padding: 5px;
- border-radius: 3px;
- opacity: 200;
-}
-
-/* Nice to have the background color change when hovered. */
-QRadioButton:hover, QCheckBox:hover {
- background-color: wheat;
-}
-
-/* Force the dialog's buttons to follow the Windows guidelines. */
-QDialogButtonBox {
- button-layout: 0;
-}
-
-
diff --git a/examples/widgets/widgets/stylesheet/qss/default.qss b/examples/widgets/widgets/stylesheet/qss/default.qss
deleted file mode 100644
index 84eb5e0bc2..0000000000
--- a/examples/widgets/widgets/stylesheet/qss/default.qss
+++ /dev/null
@@ -1 +0,0 @@
-/* empty stylesheet */
diff --git a/examples/widgets/widgets/stylesheet/qss/pagefold.qss b/examples/widgets/widgets/stylesheet/qss/pagefold.qss
deleted file mode 100644
index 3701fc713c..0000000000
--- a/examples/widgets/widgets/stylesheet/qss/pagefold.qss
+++ /dev/null
@@ -1,299 +0,0 @@
-/* Customize any plain widget that is a child of a QMainWindow. */
-QMainWindow > .QWidget {
- background-color: gainsboro;
- background-image: url(:/images/pagefold.png);
- background-position: top right;
- background-repeat: no-repeat
-}
-
-/* Provide a padding for the layout inside the frame. The frame
- exists only to provide a padding for the top-right image, so we
- explicitly disable the border. */
-#mainFrame {
- padding-right: 30px;
- border-style: none;
- border-image: none; /* since we set a border-image below */
-}
-
-/* mainFrame won't have this border-image since we have
- explicitly set it to 'none' using a more specific selector. */
-QFrame, QLineEdit, QComboBox[editable="true"], QSpinBox {
- border-image: url(:/images/frame.png) 4;
- border-width: 3;
-}
-
-QLabel {
- border: none;
- border-image: none;
- padding: 0;
- background: none;
-}
-
-/* Make text in message boxes selectable. */
-QMessageBox {
- /* LinksAccessibleByMouse | TextSelectableByMouse */
- messagebox-text-interaction-flags: 5;
-}
-
-/* Set the selection colors for all widgets. */
-QWidget {
- selection-color: black;
- selection-background-color: Silver;
- color: black;
-}
-
-/* Make the entire row selected in item views. */
-QAbstractItemView {
- show-decoration-selected: 1;
-}
-
-/* Nice WindowsXP-style password character for password line edits. */
-QLineEdit[echoMode="2"] {
- lineedit-password-character: 9679;
-}
-
-/* Customize tooltips. */
-QToolTip {
- background-color: rgb(200,200,255);
- border-color: darkslategray;
- border-width: 1px;
- border-style: solid;
- padding: 3px;
- font: bold;
- border-radius: 3px;
- opacity: 200;
-}
-
-/* Customize radio buttons. */
-
-QRadioButton {
- spacing: 5px;
-}
-
-QRadioButton::indicator {
- width: 13px;
- height: 13px;
-}
-
-QRadioButton::indicator::unchecked {
- image: url(:/images/radiobutton_unchecked.png);
-}
-
-QRadioButton::indicator:unchecked:hover {
- image: url(:/images/radiobutton_unchecked_hover.png);
-}
-
-QRadioButton::indicator:unchecked:pressed {
- image: url(:/images/radiobutton_unchecked_pressed.png);
-}
-
-QRadioButton::indicator::checked {
- image: url(:/images/radiobutton_checked.png);
-}
-
-QRadioButton::indicator:checked:hover {
- image: url(:/images/radiobutton_checked_hover.png);
-}
-
-QRadioButton::indicator:checked:pressed {
- image: url(:/images/radiobutton_checked_pressed.png);
-}
-
-/* Customize arrows. */
-
-*::down-arrow, *::menu-indicator {
- image: url(:/images/down_arrow.png);
- width: 7px;
- height: 7px;
-}
-
-*::down-arrow:disabled, *::down-arrow:off {
- image: url(:/images/down_arrow_disabled.png);
-}
-
-*::up-arrow {
- image: url(:/images/up_arrow.png);
- width: 7px;
- height: 7px;
-}
-
-*::up-arrow:disabled, *::up-arrow:off {
- image: url(:/images/up_arrow_disabled.png);
-}
-
-/* Customize push buttons and comboboxes. Our read-only combobox
- is very similar to a push button, so they share the same border image. */
-
-QPushButton {
- min-width: 4em;
-}
-
-QPushButton, QComboBox[editable="false"],
-QComboBox[editable="true"]::drop-down {
- border-image: url(:/images/pushbutton.png) 5;
- border-width: 5;
-}
-
-QPushButton:hover, QComboBox[editable="false"]:hover,
-QComboBox[editable="true"]::drop-down:hover, QMenuBar::item:hover {
- border-image: url(:/images/pushbutton_hover.png) 5;
- border-width: 5;
-}
-
-QPushButton:pressed, QComboBox[editable="false"]:on,
-QComboBox[editable="true"]::drop-down:on, QMenuBar::item:on {
- border-image: url(:/images/pushbutton_pressed.png) 5;
- border-width: 5;
-}
-
-/* Customize read-only comboboxes. */
-
-QComboBox[editable="false"] {
- padding-left: 3px;
- padding-right: 20px; /* space for the arrow */
-}
-
-QComboBox[editable="false"]::drop-down {
- subcontrol-origin: padding;
- subcontrol-position: top right;
- width: 15px;
- border-left-style: solid;
- border-left-color: darkgray;
- border-left-width: 1px;
-}
-
-QComboBox[editable="false"]::down-arrow {
- subcontrol-origin: content;
- subcontrol-position: center;
- position: relative;
- left: 1px; /* 1 pixel dropdown border */
-}
-
-/* The combobox arrow is on when the popup is open. */
-QComboBox[editable="false"]::down-arrow:on {
- position: relative;
- top: 1px;
- left: 2px;
-}
-
-/* Customize editable comboboxes. */
-
-QComboBox[editable="true"] {
- padding-right: 16px;
-}
-
-QComboBox[editable="true"]::drop-down {
- subcontrol-origin: border;
- subcontrol-position: top right;
- width: 13px;
- position: absolute;
- top: 2px;
- bottom: 2px;
- right: 2px;
-}
-
-QComboBox[editable="true"]::drop-down,
-QComboBox[editable="true"]::drop-down:hover,
-QComboBox[editable="true"]::drop-down:on {
- border-width: 0px;
- border-left-width: 3px; /* we need only left and center part */
-}
-
-/* Shift the arrow when it's open. */
-QComboBox[editable="true"]::down-arrow:on {
- position: relative;
- top: 1px;
- left: 1px;
-}
-
-/* Customize check boxes. */
-QCheckBox {
- spacing: 5px;
-}
-
-QCheckBox::indicator {
- width: 13px;
- height: 13px;
-}
-
-QCheckBox::indicator:unchecked {
- image: url(:/images/checkbox_unchecked.png);
-}
-
-QCheckBox::indicator:unchecked:hover {
- image: url(:/images/checkbox_unchecked_hover.png);
-}
-
-QCheckBox::indicator:unchecked:pressed {
- image: url(:/images/checkbox_unchecked_pressed.png);
-}
-
-QCheckBox::indicator:checked {
- image: url(:/images/checkbox_checked.png);
-}
-
-QCheckBox::indicator:checked:hover {
- image: url(:/images/checkbox_checked_hover.png);
-}
-
-QCheckBox::indicator:checked:pressed {
- image: url(:/images/checkbox_checked_pressed.png);
-}
-
-/* Customize the size grip. */
-QSizeGrip {
- image: url(:/images/sizegrip.png);
- width: 16px;
- height: 16px;
-}
-
-/* Customize the menu bar. */
-QMenuBar {
- border-image: none;
- border-style: none;
- border-width: 1px;
- border-bottom-style: solid;
- border-bottom-color: darkslategray;
- padding: 2px;
-}
-
-/* Customize spin boxes. */
-
-QSpinBox {
- padding-right: 15px;
-}
-
-QSpinBox::up-button {
- subcontrol-origin: border;
- subcontrol-position: top right;
-
- width: 16px; /* 16 + 2*1px border-width = 15px padding + 3px parent border */
- border-image: url(:/images/spinup.png) 1;
- border-width: 1px;
-}
-
-QSpinBox::up-button:hover {
- border-image: url(:/images/spinup_hover.png) 1;
-}
-
-QSpinBox::up-button:pressed {
- border-image: url(:/images/spinup_pressed.png) 1;
-}
-
-QSpinBox::down-button {
- subcontrol-origin: border;
- subcontrol-position: bottom right;
-
- width: 16px;
- border-image: url(:/images/spindown.png) 1;
- border-width: 1px;
- border-top-width: 0;
-}
-
-QSpinBox::down-button:hover {
- border-image: url(:/images/spindown_hover.png) 1;
-}
-
-QSpinBox::down-button:pressed {
- border-image: url(:/images/spindown_pressed.png) 1;
-}
diff --git a/examples/widgets/widgets/stylesheet/stylesheet.pro b/examples/widgets/widgets/stylesheet/stylesheet.pro
deleted file mode 100644
index 0fe3187f63..0000000000
--- a/examples/widgets/widgets/stylesheet/stylesheet.pro
+++ /dev/null
@@ -1,15 +0,0 @@
-QT += widgets
-requires(qtConfig(combobox))
-
-HEADERS = mainwindow.h \
- stylesheeteditor.h
-FORMS = mainwindow.ui \
- stylesheeteditor.ui
-RESOURCES = stylesheet.qrc
-SOURCES = main.cpp \
- mainwindow.cpp \
- stylesheeteditor.cpp
-
-# install
-target.path = $$[QT_INSTALL_EXAMPLES]/widgets/widgets/stylesheet
-INSTALLS += target
diff --git a/examples/widgets/widgets/stylesheet/stylesheet.qrc b/examples/widgets/widgets/stylesheet/stylesheet.qrc
deleted file mode 100644
index e1e61a920a..0000000000
--- a/examples/widgets/widgets/stylesheet/stylesheet.qrc
+++ /dev/null
@@ -1,39 +0,0 @@
-<RCC>
-<qresource prefix="/">
- <file>layouts/default.ui</file>
- <file>layouts/pagefold.ui</file>
- <file>qss/coffee.qss</file>
- <file>qss/default.qss</file>
- <file>qss/pagefold.qss</file>
- <file>images/pagefold.png</file>
- <file>images/frame.png</file>
- <file>images/radiobutton_unchecked.png</file>
- <file>images/radiobutton_unchecked_pressed.png</file>
- <file>images/radiobutton_unchecked_hover.png</file>
- <file>images/radiobutton_checked.png</file>
- <file>images/radiobutton_checked_pressed.png</file>
- <file>images/radiobutton_checked_hover.png</file>
- <file>images/pushbutton.png</file>
- <file>images/pushbutton_hover.png</file>
- <file>images/pushbutton_pressed.png</file>
- <file>images/checkbox_unchecked.png</file>
- <file>images/checkbox_unchecked_pressed.png</file>
- <file>images/checkbox_unchecked_hover.png</file>
- <file>images/checkbox_checked.png</file>
- <file>images/checkbox_checked_pressed.png</file>
- <file>images/checkbox_checked_hover.png</file>
- <file>images/down_arrow.png</file>
- <file>images/down_arrow_disabled.png</file>
- <file>images/up_arrow.png</file>
- <file>images/up_arrow_disabled.png</file>
- <file>images/sizegrip.png</file>
- <file>images/spinup.png</file>
- <file>images/spinup_off.png</file>
- <file>images/spinup_hover.png</file>
- <file>images/spinup_pressed.png</file>
- <file>images/spindown.png</file>
- <file>images/spindown_off.png</file>
- <file>images/spindown_hover.png</file>
- <file>images/spindown_pressed.png</file>
-</qresource>
-</RCC>
diff --git a/examples/widgets/widgets/stylesheet/stylesheeteditor.cpp b/examples/widgets/widgets/stylesheet/stylesheeteditor.cpp
deleted file mode 100644
index f885964a31..0000000000
--- a/examples/widgets/widgets/stylesheet/stylesheeteditor.cpp
+++ /dev/null
@@ -1,111 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "stylesheeteditor.h"
-
-#include <QFile>
-#include <QRegularExpression>
-#include <QStyleFactory>
-
-StyleSheetEditor::StyleSheetEditor(QWidget *parent)
- : QDialog(parent)
-{
- ui.setupUi(this);
-
- connect(ui.styleCombo, &QComboBox::textActivated, this, &StyleSheetEditor::setStyleName);
- connect(ui.styleSheetCombo, &QComboBox::textActivated, this, &StyleSheetEditor::setStyleSheetName);
- connect(ui.styleTextEdit, &QTextEdit::textChanged, this, &StyleSheetEditor::setModified);
- connect(ui.applyButton, &QAbstractButton::clicked, this, &StyleSheetEditor::apply);
-
- QRegularExpression regExp("^.(.*)\\+?Style$");
- QString defaultStyle = QApplication::style()->metaObject()->className();
- QRegularExpressionMatch match = regExp.match(defaultStyle);
-
- if (match.hasMatch())
- defaultStyle = match.captured(1);
-
- ui.styleCombo->addItems(QStyleFactory::keys());
- ui.styleCombo->setCurrentIndex(ui.styleCombo->findText(defaultStyle, Qt::MatchContains));
- ui.styleSheetCombo->setCurrentIndex(ui.styleSheetCombo->findText("Coffee"));
- loadStyleSheet("Coffee");
-}
-
-void StyleSheetEditor::setStyleName(const QString &styleName)
-{
- qApp->setStyle(styleName);
- ui.applyButton->setEnabled(false);
-}
-
-void StyleSheetEditor::setStyleSheetName(const QString &sheetName)
-{
- loadStyleSheet(sheetName);
-}
-
-void StyleSheetEditor::setModified()
-{
- ui.applyButton->setEnabled(true);
-}
-
-void StyleSheetEditor::apply()
-{
- qApp->setStyleSheet(ui.styleTextEdit->toPlainText());
- ui.applyButton->setEnabled(false);
-}
-
-void StyleSheetEditor::loadStyleSheet(const QString &sheetName)
-{
- QFile file(":/qss/" + sheetName.toLower() + ".qss");
- file.open(QFile::ReadOnly);
- QString styleSheet = QString::fromLatin1(file.readAll());
-
- ui.styleTextEdit->setPlainText(styleSheet);
- qApp->setStyleSheet(styleSheet);
- ui.applyButton->setEnabled(false);
-}
diff --git a/examples/widgets/widgets/stylesheet/stylesheeteditor.h b/examples/widgets/widgets/stylesheet/stylesheeteditor.h
deleted file mode 100644
index 4105d61d5d..0000000000
--- a/examples/widgets/widgets/stylesheet/stylesheeteditor.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef STYLESHEETEDITOR_H
-#define STYLESHEETEDITOR_H
-
-#include <QDialog>
-
-#include "ui_stylesheeteditor.h"
-
-class StyleSheetEditor : public QDialog
-{
- Q_OBJECT
-
-public:
- StyleSheetEditor(QWidget *parent = nullptr);
-
-private slots:
- void setStyleName(const QString &styleName);
- void setStyleSheetName(const QString &styleSheetName);
- void setModified();
- void apply();
-
-private:
- void loadStyleSheet(const QString &sheetName);
-
- Ui::StyleSheetEditor ui;
-};
-
-#endif
diff --git a/examples/widgets/widgets/stylesheet/stylesheeteditor.ui b/examples/widgets/widgets/stylesheet/stylesheeteditor.ui
deleted file mode 100644
index 34cd7f6d04..0000000000
--- a/examples/widgets/widgets/stylesheet/stylesheeteditor.ui
+++ /dev/null
@@ -1,171 +0,0 @@
-<ui version="4.0" >
- <class>StyleSheetEditor</class>
- <widget class="QWidget" name="StyleSheetEditor" >
- <property name="geometry" >
- <rect>
- <x>0</x>
- <y>0</y>
- <width>445</width>
- <height>289</height>
- </rect>
- </property>
- <property name="windowTitle" >
- <string>Style Editor</string>
- </property>
- <layout class="QGridLayout" >
- <property name="margin" >
- <number>9</number>
- </property>
- <property name="spacing" >
- <number>6</number>
- </property>
- <item row="0" column="6" >
- <spacer>
- <property name="orientation" >
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeType" >
- <enum>QSizePolicy::MinimumExpanding</enum>
- </property>
- <property name="sizeHint" >
- <size>
- <width>32</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- <item row="0" column="0" >
- <spacer>
- <property name="orientation" >
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeType" >
- <enum>QSizePolicy::MinimumExpanding</enum>
- </property>
- <property name="sizeHint" >
- <size>
- <width>32</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- <item row="0" column="5" >
- <widget class="QComboBox" name="styleSheetCombo" >
- <item>
- <property name="text" >
- <string>Default</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Coffee</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Pagefold</string>
- </property>
- </item>
- </widget>
- </item>
- <item row="0" column="3" >
- <spacer>
- <property name="orientation" >
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeType" >
- <enum>QSizePolicy::Fixed</enum>
- </property>
- <property name="sizeHint" >
- <size>
- <width>10</width>
- <height>16</height>
- </size>
- </property>
- </spacer>
- </item>
- <item row="0" column="2" >
- <widget class="QComboBox" name="styleCombo" >
- <property name="sizePolicy" >
- <sizepolicy>
- <hsizetype>5</hsizetype>
- <vsizetype>0</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- </widget>
- </item>
- <item row="0" column="1" >
- <widget class="QLabel" name="label_7" >
- <property name="sizePolicy" >
- <sizepolicy>
- <hsizetype>0</hsizetype>
- <vsizetype>5</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text" >
- <string>Style:</string>
- </property>
- </widget>
- </item>
- <item row="2" column="0" colspan="7" >
- <layout class="QHBoxLayout" >
- <property name="margin" >
- <number>0</number>
- </property>
- <property name="spacing" >
- <number>6</number>
- </property>
- <item>
- <spacer>
- <property name="orientation" >
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" >
- <size>
- <width>321</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- <item>
- <widget class="QPushButton" name="applyButton" >
- <property name="enabled" >
- <bool>false</bool>
- </property>
- <property name="text" >
- <string>&amp;Apply</string>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- <item row="1" column="0" colspan="7" >
- <widget class="QTextEdit" name="styleTextEdit" />
- </item>
- <item row="0" column="4" >
- <widget class="QLabel" name="label_8" >
- <property name="sizePolicy" >
- <sizepolicy>
- <hsizetype>0</hsizetype>
- <vsizetype>5</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text" >
- <string>Style Sheet:</string>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- <resources/>
- <connections/>
-</ui>