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. Application wide "system theme"?
QtWS25 Last Chance

Application wide "system theme"?

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
systempalettekdeqtquick
4 Posts 3 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.
  • R Offline
    R Offline
    Rouleaux
    wrote on 2 Aug 2016, 12:23 last edited by
    #1

    Is there an easy way to implement application-wide themes?

    I have been strugging to accomplish this task with SystemPalette, but that doesn't seem to apply it application-wide. Just the element gets colored.

    ? R 2 Replies Last reply 2 Aug 2016, 12:48
    0
    • R Rouleaux
      2 Aug 2016, 12:23

      Is there an easy way to implement application-wide themes?

      I have been strugging to accomplish this task with SystemPalette, but that doesn't seem to apply it application-wide. Just the element gets colored.

      ? Offline
      ? Offline
      A Former User
      wrote on 2 Aug 2016, 12:48 last edited by A Former User 8 Feb 2016, 12:51
      #2

      @Rouleaux Qt Quick Controls 2 introduced a new styling API. Qt 5.7 comes with 3 predefined styles (Default, Material, Universal).

      • Styling Qt Quick Controls 2
      • Customizing Qt Quick Controls 2
      • Creating a Custom Style
      1 Reply Last reply
      2
      • R Offline
        R Offline
        Rouleaux
        wrote on 2 Aug 2016, 12:50 last edited by
        #3

        Thank you!

        1 Reply Last reply
        0
        • R Rouleaux
          2 Aug 2016, 12:23

          Is there an easy way to implement application-wide themes?

          I have been strugging to accomplish this task with SystemPalette, but that doesn't seem to apply it application-wide. Just the element gets colored.

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

          @Rouleaux

          import QtQuick
          import QtQuick.Controls
          import QtQuick.Controls.Universal // Imports Windows 10 theme.
          ApplicationWindow {
              visible: true
              Universal.theme: Universal.System // Uses Windows 10 theme.
          

          This only really works on Windows, though. Without this, I've found that it adheres correctly to the system theme of KDE Plasma.

          Perhaps mark as solved?

          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