[Development] Future of Qss and QWidgets themes

Milian Wolff mail at milianw.de
Mon Jun 23 13:43:20 CEST 2014

On Monday 23 June 2014 17:01:30 PCMan wrote:
> Hello,
> I'm Hong Jen Yee (nickname: pcman), a developer of LXQt desktop
> (http://lxqt.org/).
> We're building a classic desktop environment based on Qt, but we're
> using QWidgets rather than QML. Soon we encountered the theme issues
> about Qt.
> For Windows and for OS X, native look & feels are wanted.
> This, however, is not the case for UNIX desktop environments.
> The default "fusion" style is not really customizable.
> Of course apps can use qss to customize their appearance, but it's
> scope is limited to one application only. It's hard to customize all
> Qt apps using qss.
> I can use a platform plugin to inject some qss code to every Qt apps
> running in our DE to change the appearance of buttons and other
> widgets, but the final results highly depend on the style plugin we
> used.
> To customize the look and feel of all Qt applications, we have the
> following options.
> 1. develop our own customizable style plugin (quite difficult)
> 2. inject some qss code to every app via a platform plugin (dirty,
> unreliable, style plugin-dependent, unpredictable results)
> In gtk+ 3, using the "adwita" theme engine, you can create a brand new
> theme with css syntax and pixmaps only without writing any C code.
> In Qt, creating a new theme actually means writing a new QStyle
> plugin, which is non-trivial (especially for artists/designers).
> Since the Qss parser and QssProxyStyle code are in place, is it
> possible to make part of them public classes, so at least we can do
> the following:
> 1. Paint some pre-defined patterns on QPainter using qss.
> 2. Create a generic QStyle plugin, which can be customized by users
> and 3rd party developers via qss.
> I understand that the focus is o Qml, but since QWidgets is very
> complete and well-documented, it's still widely used and need some
> more love.

You could also take one of the other existing styles and adapt it to your 
needs, no? Like QtCurve, which has been around for ages, and has tons of knobs 
to change it to your likings.


Milian Wolff
mail at milianw.de

More information about the Development mailing list