Move stylesheets example to manual test

Pick-to: 6.5 6.6
Change-Id: If0206e63546bf948af4cfb65773e2662c53a5e79
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
This commit is contained in:
Tor Arne Vestbø 2023-06-26 15:20:01 +02:00
parent c5ee7c8b8f
commit 1e954f9be8
52 changed files with 2 additions and 83 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

View File

@ -1,64 +0,0 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
/*!
\example widgets/stylesheet
\title Style Sheet Example
\ingroup examples-widgets
\brief The Style Sheet Example shows how to use style sheets.
\borderedimage stylesheet-pagefold.png
\caption Screen Shot of the Pagefold style sheet
The Style Sheet example shows how widgets can be styled using Qt Style Sheets.
You can open the style editor by selecting \uicontrol File > \uicontrol Edit Style Sheet,
to select an existing style sheet or design your own style and load it.
The Style Sheet example consists of 2 classes:
\list
\li \c MainWindow
\li \c StyleSheetEditor
\endlist
\section1 MainWindow Class
\c MainWindow inherits QWidget, and is the application's main window defined in
\c mainwindow.ui. The style of \c MainWindow can be modified with \c StyleSheetEditor.
\section1 StyleSheetEditor Class
\c StyleSheetEditor enables you to open an editor where you can load an existing style sheet.
It is also possible to define a new stylesheet and load it. Its layout is defined in
\c stylesheeteditor.ui.
\quotefromfile widgets/stylesheet/stylesheeteditor.cpp
\skipto setStyleName
\printline setStyleName
Sets the specified \a styleName and grays the \c applyButton.
\skipto setStyleSheetName
\printline setStyleSheetName
Loads the stylesheet from \c styleSheetName.
\skipto setModified()
\printline setModified()
Enables the \c applyButton when the text in the buffer has changed.
\skipto apply()
\printline apply()
Sets the stylesheet properties in \l qApp and disables the \c applyButton.
\skipto loadStyleSheet(const QString &sheetName)
\printline loadStyleSheet(const QString &sheetName)
Loads the specified \a sheetName, and sets its properties in
\l qApp.
*/

View File

@ -12,7 +12,6 @@ qt_internal_add_example(shortcuteditor)
qt_internal_add_example(sliders)
qt_internal_add_example(spinboxes)
qt_internal_add_example(styles)
qt_internal_add_example(stylesheet)
qt_internal_add_example(tablet)
qt_internal_add_example(tetrix)
qt_internal_add_example(tooltips)

View File

@ -9,7 +9,6 @@ SUBDIRS = analogclock \
sliders \
spinboxes \
styles \
stylesheet \
tablet \
tetrix \
tooltips \

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

View File

@ -85,22 +85,7 @@
buttons and check boxes to make them stand out. Using this
technique, you can also achieve minor customizations that would
normally require subclassing several style classes, such as
specifying a \l{QStyle::styleHint()}{style hint}. The
\l{widgets/stylesheet}{Style Sheet} example depicted below defines
two distinctive style sheets that you can try out and modify at
will.
\table
\row \li \inlineimage stylesheet-pagefold.png
\row \li Pagefold theme running on Windows
\endtable
\table
\row \li \inlineimage stylesheet-coffee-cleanlooks.png
\li \inlineimage stylesheet-pagefold-mac.png
\row \li Coffee theme running on Ubuntu Linux
\li Pagefold theme running on \macos
\endtable
specifying a \l{QStyle::styleHint()}{style hint}.
When a style sheet is active, the QStyle returned by QWidget::style()
is a wrapper "style sheet" style, \e not the platform-specific style. The
@ -4073,7 +4058,7 @@
\image stylesheet-treeview.png
\sa {Style Sheet Example}, {Supported HTML Subset}, QStyle
\sa {Supported HTML Subset}, QStyle
\section1 Common Mistakes

View File

Before

Width:  |  Height:  |  Size: 175 B

After

Width:  |  Height:  |  Size: 175 B

View File

Before

Width:  |  Height:  |  Size: 253 B

After

Width:  |  Height:  |  Size: 253 B

View File

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

Before

Width:  |  Height:  |  Size: 533 B

After

Width:  |  Height:  |  Size: 533 B

View File

Before

Width:  |  Height:  |  Size: 129 B

After

Width:  |  Height:  |  Size: 129 B

View File

Before

Width:  |  Height:  |  Size: 276 B

After

Width:  |  Height:  |  Size: 276 B

View File

Before

Width:  |  Height:  |  Size: 249 B

After

Width:  |  Height:  |  Size: 249 B

View File

Before

Width:  |  Height:  |  Size: 283 B

After

Width:  |  Height:  |  Size: 283 B

View File

Before

Width:  |  Height:  |  Size: 277 B

After

Width:  |  Height:  |  Size: 277 B

View File

Before

Width:  |  Height:  |  Size: 274 B

After

Width:  |  Height:  |  Size: 274 B

View File

Before

Width:  |  Height:  |  Size: 197 B

After

Width:  |  Height:  |  Size: 197 B