Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to apply qtcreator's light flat theme to my app?

How to apply qtcreator's light flat theme to my app?

Scheduled Pinned Locked Moved Solved General and Desktop
9 Posts 3 Posters 4.1k 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.
  • M Offline
    M Offline
    muratkarakus7
    wrote on last edited by
    #1

    Hi,

    The new theme of QtCreator looks nice and I want to apply to my application. However, I couldn't figure it out how to do it yet. Does anyone know how to achieve it?

    https://blog.qt.io/blog/2015/02/09/qt-creator-flat-style-ui-design-new-light-theme/

    Thanks

    1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by mrjj
      #2

      Hi
      As far as I know , its not Qt style, but a private Creator theme
      The files are here
      C:\Qt\Tools\QtCreator\share\qtcreator\themes
      Its based on the Fusion style and these files specify the actual colors used.
      [Palette]
      shadowBackground=ff404244
      text=ffd0d0d0
      textDisabled=60a4a6a8
      ...

      So you might be able to recreate it
      QApplication::setStyle(QStyleFactory::create("Fusion"));
      QPalette p;
      p = qApp->palette();
      p.setColor(QPalette::Window, QColor(53,53,53));
      p.setColor(QPalette::Button, QColor(53,53,53));
      p.setColor(QPalette::Highlight, QColor(142,45,197));
      p.setColor(QPalette::ButtonText, QColor(255,255,255));
      ........
      for all colors that matters..
      qApp->setPalette(p);

      But as far I know, there is no way to just re-use it.

      1 Reply Last reply
      3
      • M Offline
        M Offline
        muratkarakus7
        wrote on last edited by
        #3

        Thank you for the answer!

        Qt should make it available as a style. It would be very nice if i can just enable it with '-style=fusion-dark-flat" or sth like that.

        mrjjM 1 Reply Last reply
        2
        • M muratkarakus7

          Thank you for the answer!

          Qt should make it available as a style. It would be very nice if i can just enable it with '-style=fusion-dark-flat" or sth like that.

          mrjjM Offline
          mrjjM Offline
          mrjj
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @muratkarakus7
          Hi
          Yeah you are not the first to want that.
          Often they set the dark theme and first time they run the program they want it
          to stay the same colors as in design mode.

          1 Reply Last reply
          0
          • M Offline
            M Offline
            muratkarakus7
            wrote on last edited by
            #5

            "Yeah you are not the first to want that."
            Because it is commonsense :D

            mrjjM 1 Reply Last reply
            2
            • M muratkarakus7

              "Yeah you are not the first to want that."
              Because it is commonsense :D

              mrjjM Offline
              mrjjM Offline
              mrjj
              Lifetime Qt Champion
              wrote on last edited by mrjj
              #6

              @muratkarakus7
              yeah, its easy to expect when using a WYSIWYG editor and all but the colors
              are as shown as seen in design mode. :)

              1 Reply Last reply
              1
              • M Offline
                M Offline
                muratkarakus7
                wrote on last edited by
                #7

                Exactly!!!

                mrjjM 1 Reply Last reply
                0
                • M muratkarakus7

                  Exactly!!!

                  mrjjM Offline
                  mrjjM Offline
                  mrjj
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  @muratkarakus7
                  If a strong wish, you could ask the developers
                  qt-creator@qt-project.org.
                  If there a way to use it more easy than recreating it.

                  I looked around a bit in the code but there seems to be more into play than
                  just loading the theme files for Creator.

                  1 Reply Last reply
                  1
                  • ? Offline
                    ? Offline
                    A Former User
                    wrote on last edited by A Former User
                    #9

                    Just as a side note: Qt Quick Controls 2 support modern, flat styles (AKA "default", "material" and "universal") OOTB.

                    1 Reply Last reply
                    3

                    • Login

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