Details
-
Suggestion
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
None
Description
https://doc.qt.io/qt-6/qml-qtquick-systempalette.html is quite a different API compared to https://doc.qt.io/qt-6/qml-qtquick-palette.html Plus, the SystemPalette has had unfilled gaps for years (see the sub-tasks under QTBUG-111705 )
The learning curve would be reduced, maintenance would be simplified, and future gaps would be avoided if both APIs were consolidated.
Possible approach
Turn SystemPalette into an Attached Property that provides read-only access to an underlying Palette object
Current example at https://doc.qt.io/qt-6/qml-qtquick-systempalette.html#details :
import QtQuick 2.0 Rectangle { SystemPalette { id: myPalette; colorGroup: SystemPalette.Active } width: 640; height: 480 color: myPalette.window Text { anchors.fill: parent text: "Hello!"; color: myPalette.windowText } }
Consolidated version:
import QtQuick Rectangle { width: 640; height: 480 color: SystemPalette.active.window Text { anchors.fill: parent text: "Hello!"; color: SystemPalette.active.windowText } }
Attachments
Issue Links
- relates to
-
QTBUG-111705 QML SystemPalette API should have parity with QML ColorGroup API and C++ QPalette API
- Reported