If I want to adhere to the platform styles, what's the best Qt stack?
-
I'm trying to get as high-level as I can whilst maintaining as close to 1:1 parity with the desktop style as I can. Originally, after seeing my LINX 1010's 32-bit EFI written in wxWidgets, I expected that
github.com/wxWidgets/wxWidgets/issues/19352
would provide what I need. However, it's yet to progress in the years since I saw it, and I've since begun to consider Qt to be a superior replacement.Being the novice I am (all I'm familiar with are PyQt6 and PySide6's QtWidgets bindings), what's the best way to achieve this, if it's whatsoever feasible? Currently, per
forum.qt.io/post/830268
, I see little way to achieve Material 3 support in QtWidgets, and all of the listed platform-specific styles indoc.qt.io/qt-6/qtquickcontrols-styles.html#available-styles
appear to be exactly what I desire.Per
stackoverflow.com/revisions/21774118/1
, I'll presume that I'll get native styling on KDE Plasma, my DE, too. However, I'd like to know whether theseQQuickStyle
s can be switched between per platform, or whether the GUI must be rewritten for each style? If the former, I suppose there's no alternative to QML, so my decision is easy? -
I'm trying to get as high-level as I can whilst maintaining as close to 1:1 parity with the desktop style as I can. Originally, after seeing my LINX 1010's 32-bit EFI written in wxWidgets, I expected that
github.com/wxWidgets/wxWidgets/issues/19352
would provide what I need. However, it's yet to progress in the years since I saw it, and I've since begun to consider Qt to be a superior replacement.Being the novice I am (all I'm familiar with are PyQt6 and PySide6's QtWidgets bindings), what's the best way to achieve this, if it's whatsoever feasible? Currently, per
forum.qt.io/post/830268
, I see little way to achieve Material 3 support in QtWidgets, and all of the listed platform-specific styles indoc.qt.io/qt-6/qtquickcontrols-styles.html#available-styles
appear to be exactly what I desire.Per
stackoverflow.com/revisions/21774118/1
, I'll presume that I'll get native styling on KDE Plasma, my DE, too. However, I'd like to know whether theseQQuickStyle
s can be switched between per platform, or whether the GUI must be rewritten for each style? If the former, I suppose there's no alternative to QML, so my decision is easy?@RokeJulianLockhart said in If I want to adhere to the platform styles, what's the best Qt stack?:
I see little way to achieve Material 3 support in QtWidgets
Correct, there is no Material support in Qt Widgets
I'd like to know whether these
QQuickStyles
can be switched between per platform, or whether the GUI must be rewritten for each style?Yes, you can switch between different styles.
- The default styles for different platforms are listed at https://doc.qt.io/qt-6/qtquickcontrols-styles.html#default-styles
- You can call a function and/or provide a config file to specify non-default styles: https://doc.qt.io/qt-6/qtquickcontrols-styles.html#run-time-style-selection (the config file also lets you specify style-specific options, like Material Design accent colours)
Per stackoverflow.com/revisions/21774118/1, I'll presume that I'll get native styling on KDE Plasma, my DE, too.
I'm not familiar with how KDE Plasma styles its controls. If it provides a Qt Quick Controls plugin, then yes you can configure your app's Qt Quick Controls to use the KDE style (using the same function/config file that I mentioned above).
-
R RokeJulianLockhart has marked this topic as solved on
-
@JKSH, thank you.
post/744511
explains well how to code for this.