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
Forum Updated to NodeBB v4.3 + New Features

Using the system theme

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
dark modetheme
4 Posts 2 Posters 1.4k Views 1 Watching
  • 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.
  • LorenDBL Offline
    LorenDBL Offline
    LorenDB
    wrote on last edited by LorenDB
    #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.

    RokeJulianLockhartR 1 Reply Last reply
    0
    • LorenDBL LorenDB

      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.

      RokeJulianLockhartR Offline
      RokeJulianLockhartR Offline
      RokeJulianLockhart
      wrote on last edited by RokeJulianLockhart
      #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.

      LorenDBL 1 Reply Last reply
      0
      • RokeJulianLockhartR RokeJulianLockhart
        Universal.style: Universal.System
        

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

        LorenDBL Offline
        LorenDBL Offline
        LorenDB
        wrote on last edited by
        #3

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

        RokeJulianLockhartR 1 Reply Last reply
        1
        • LorenDBL LorenDB

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

          RokeJulianLockhartR Offline
          RokeJulianLockhartR Offline
          RokeJulianLockhart
          wrote on 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