Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. QML Styling
Forum Updated to NodeBB v4.3 + New Features

QML Styling

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
1 Posts 1 Posters 175 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    Bob64
    wrote on last edited by
    #1

    Can anyone provide any pointers to guidance on how to implement styling/theming in a QML application.

    I am aware of https://wiki.qt.io/Qml_Styling but it has not substantially changed since 2015. Is this still good advice?

    What I am trying to achieve is to apply some colours in a consistent manner across my application according to a theme that I have been asked to use. Furthermore, a light and dark version of the theme exist. The application currently uses colour in a rather ad hoc way so it is going to take some work, but I need a plan of how to get there. Is the use of a style singleton as in the link above considered to be a reasonable approach?

    Other than that article, I am also aware of the built-in styles but I have never figured out when it is appropriate to use them. Whenever I experimentally switched styles from the default one I am using, everything just looks like a mess. Unfortunately, I have to use TreeView from Controls 1, and I have my own customisations of various controls. I suspect that neither of these things play nicely with the built-in styles, but there is so little discussion anywhere that I don't know what to expect.

    I believe the built-in styles are implemented using the Qt Quick Templates 2 module. Is one supposed to use this to make one's own style and is that considered to be a better/more modern approach than the style singleton approach? Again, I am struggling to find any useful information.

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved