aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquickwindow.cpp
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@qt.io>2023-05-16 06:54:55 +0200
committerShawn Rutledge <shawn.rutledge@qt.io>2023-05-17 00:02:11 +0200
commitf1e7e1c3987b905157a1b9b418ea2649100eb390 (patch)
tree519b73813a61b5d6357a32a30df9f07b73a6739c /src/quick/items/qquickwindow.cpp
parent8d2ec6c1b223d69d828de3508f40681fdc349b5b (diff)
doc: Clarify usage of palette; testable snippets
- color groups are better shown with copyable monospace syntax rather than capitalized - clarify that using palette grouped-property syntax does not imply that you must define every color - Window has a palette property, inited from SystemPalette: it's not only ApplicationWindow - testable snippets - reuse part of the windowPalette snippet for the Window.active property (switching colors might be the main use case) - make more links Pick-to: 6.2 6.5 Change-Id: I5974351ba66fc9aeec34cb6a4aba1eb85289f536 Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
Diffstat (limited to 'src/quick/items/qquickwindow.cpp')
-rw-r--r--src/quick/items/qquickwindow.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/quick/items/qquickwindow.cpp b/src/quick/items/qquickwindow.cpp
index 54e73abc91..6a0c405be3 100644
--- a/src/quick/items/qquickwindow.cpp
+++ b/src/quick/items/qquickwindow.cpp
@@ -3552,6 +3552,9 @@ void QQuickWindow::endExternalCommands()
The active status of the window.
+ \snippet qml/windowPalette.qml declaration-and-color
+ \snippet qml/windowPalette.qml closing-brace
+
\sa requestActivate()
*/
@@ -4190,10 +4193,11 @@ void QQuickWindow::setTextRenderType(QQuickWindow::TextRenderType renderType)
palette which serves as a default for all application windows. You can also set the default palette
for windows by passing a custom palette to QGuiApplication::setPalette(), before loading any QML.
- ApplicationWindow propagates explicit palette properties to child controls. If you change a specific
- property on the window's palette, that property propagates to all child controls in the window,
+ Window propagates explicit palette properties to child items and controls,
overriding any system defaults for that property.
+ \snippet qml/windowPalette.qml entire
+
\sa Item::palette, Popup::palette, ColorGroup, SystemPalette
//! internal \sa QQuickAbstractPaletteProvider, QQuickPalette
*/