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

Application color scheme

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 2 Posters 704 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.
  • ivanicyI Offline
    ivanicyI Offline
    ivanicy
    wrote on last edited by
    #1

    Hello!!

    I am developing an application in which I want to have a color scheme system. The user could select the color scheme and the application must change between, for example, reds to greens or something like that.

    How could I do it?

    Thank you very much!

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

      Hi
      but do you already use stylesheets so you can change colors ?

      Also what about any icons etc ?

      ivanicyI 1 Reply Last reply
      0
      • mrjjM mrjj

        Hi
        but do you already use stylesheets so you can change colors ?

        Also what about any icons etc ?

        ivanicyI Offline
        ivanicyI Offline
        ivanicy
        wrote on last edited by
        #3

        @mrjj Yes, I use stylesheets but my question is if there is a way to make it more automatic and not have to change every .css file manually. I think in android, for examplo, you can set a color palette

        mrjjM 1 Reply Last reply
        0
        • ivanicyI ivanicy

          @mrjj Yes, I use stylesheets but my question is if there is a way to make it more automatic and not have to change every .css file manually. I think in android, for examplo, you can set a color palette

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

          @ivanicy

          Hi
          Not that I have seen as you can't really use named colors in the css, nor does the QStyle on each platform
          always honor the palette.

          you never have to manually change the .css

          auto style_sheet = QString("border: 1px solid green;"
          "background-color: #%1;") .arg(QPalette().color(QPalette::Base).rgba(), 0, 16);

          but you will have to make it possible for code to change them.

          1 Reply Last reply
          1

          • Login

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