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. Using the system theme

Using the system theme

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
dark modetheme
4 Posts 2 Posters 1.4k 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.
  • L Offline
    L Offline
    LorenDB
    wrote on 1 Feb 2021, 19:21 last edited by LorenDB 2 Jan 2021, 19:23
    #1

    I did some research on the topic of system themes and found that setting things like Universal.style: Universal.System (or Material, depending on what style you're using) can make a QML app follow the system theme between light and dark. This works perfectly on my Linux desktop (KDE Plasma), but refuses to work on my Android phone. What could be the problem?

    Edit: Also, I'm noticing that the system style does not dynamically change with the system theme. Instead, the app must be restarted.

    R 1 Reply Last reply 29 Apr 2023, 17:07
    0
    • L LorenDB
      1 Feb 2021, 19:21

      I did some research on the topic of system themes and found that setting things like Universal.style: Universal.System (or Material, depending on what style you're using) can make a QML app follow the system theme between light and dark. This works perfectly on my Linux desktop (KDE Plasma), but refuses to work on my Android phone. What could be the problem?

      Edit: Also, I'm noticing that the system style does not dynamically change with the system theme. Instead, the app must be restarted.

      R Offline
      R Offline
      RokeJulianLockhart
      wrote on 29 Apr 2023, 17:07 last edited by RokeJulianLockhart 2 Sept 2025, 18:59
      #2
      Universal.style: Universal.System
      

      @LorenDB Where does the aforementioned go in the QML file?

      When using a forum, remember to tag the person you are responding to, in case they are not subscribed to the thread.

      L 1 Reply Last reply 29 Apr 2023, 17:09
      0
      • R RokeJulianLockhart
        29 Apr 2023, 17:07
        Universal.style: Universal.System
        

        @LorenDB Where does the aforementioned go in the QML file?

        L Offline
        L Offline
        LorenDB
        wrote on 29 Apr 2023, 17:09 last edited by
        #3

        @BEEDELL-ROKE-JULIAN-LOCKHART normally in your root element

        R 1 Reply Last reply 29 Apr 2023, 17:33
        1
        • L LorenDB
          29 Apr 2023, 17:09

          @BEEDELL-ROKE-JULIAN-LOCKHART normally in your root element

          R Offline
          R Offline
          RokeJulianLockhart
          wrote on 29 Apr 2023, 17:33 last edited by RokeJulianLockhart
          #4

          @LorenDB, thanks. That worked. I'll be testing my code eventually on Android too, so if I ascertain a solution I'll notify you of it.

          When using a forum, remember to tag the person you are responding to, in case they are not subscribed to the thread.

          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