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. Make QPushButtons have more vibrant colors
Forum Updated to NodeBB v4.3 + New Features

Make QPushButtons have more vibrant colors

Scheduled Pinned Locked Moved Solved General and Desktop
9 Posts 3 Posters 544 Views 3 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.
  • S Offline
    S Offline
    Sucharek
    wrote on last edited by
    #1

    Hi, I wanna increase the vibrance in QPushButtons. It just seems that they don't have enough color. Can I increase the vibrancy somehow?

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

      If you doing cross platform apps, don't change anything and let Qt manage that.
      On Mac, changing the color of one button will be ugly.
      Your taste will be not the same as your users.

      Or you should redesing a complete interface, some special apps like audio apps do that, Here the interface i use for synthetizer editors
      But it's a lot of work.

      S 2 Replies Last reply
      2
      • M Offline
        M Offline
        mpergand
        wrote on last edited by
        #2

        Would you complain about flat design ? :)

        S 1 Reply Last reply
        0
        • M mpergand

          Would you complain about flat design ? :)

          S Offline
          S Offline
          Sucharek
          wrote on last edited by
          #3

          Hi @mpergand, well I'm not complaining, I just think that it doesn't have enough color.
          Compared to a QLineEdit, it's nowhere near as vibrant.
          Pictures for comparison:
          cf030c74-f7f7-46ca-aa81-8ea3930d591d-image.png f58c6e47-e7c0-47b3-adea-80b3200f1d87-image.png

          raven-worxR M 2 Replies Last reply
          0
          • S Sucharek

            Hi @mpergand, well I'm not complaining, I just think that it doesn't have enough color.
            Compared to a QLineEdit, it's nowhere near as vibrant.
            Pictures for comparison:
            cf030c74-f7f7-46ca-aa81-8ea3930d591d-image.png f58c6e47-e7c0-47b3-adea-80b3200f1d87-image.png

            raven-worxR Offline
            raven-worxR Offline
            raven-worx
            Moderators
            wrote on last edited by
            #4

            @Sucharek
            https://doc.qt.io/qt-5/stylesheet-examples.html#customizing-a-qpushbutton-using-the-box-model

            --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
            If you have a question please use the forum so others can benefit from the solution in the future

            1 Reply Last reply
            2
            • S Sucharek

              Hi @mpergand, well I'm not complaining, I just think that it doesn't have enough color.
              Compared to a QLineEdit, it's nowhere near as vibrant.
              Pictures for comparison:
              cf030c74-f7f7-46ca-aa81-8ea3930d591d-image.png f58c6e47-e7c0-47b3-adea-80b3200f1d87-image.png

              M Offline
              M Offline
              mpergand
              wrote on last edited by mpergand
              #5

              Have you try to change the background color by style sheet
              What's your OS ?

              S 1 Reply Last reply
              1
              • M mpergand

                Have you try to change the background color by style sheet
                What's your OS ?

                S Offline
                S Offline
                Sucharek
                wrote on last edited by
                #6

                Hi @mpergand, I'm on Windows, but I use a fusion theme. I just think it looks better, but the only thing that bothers me, are the buttons. I'm also doing it cross-platform, so I'd need to use the fusion theme, or make my own theme as @raven-worx linked a thing to do it, but I'm not sure how to like "change" the color entirely. Do I need to use images?

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

                  If you doing cross platform apps, don't change anything and let Qt manage that.
                  On Mac, changing the color of one button will be ugly.
                  Your taste will be not the same as your users.

                  Or you should redesing a complete interface, some special apps like audio apps do that, Here the interface i use for synthetizer editors
                  But it's a lot of work.

                  S 2 Replies Last reply
                  2
                  • M mpergand

                    If you doing cross platform apps, don't change anything and let Qt manage that.
                    On Mac, changing the color of one button will be ugly.
                    Your taste will be not the same as your users.

                    Or you should redesing a complete interface, some special apps like audio apps do that, Here the interface i use for synthetizer editors
                    But it's a lot of work.

                    S Offline
                    S Offline
                    Sucharek
                    wrote on last edited by
                    #8

                    Hi @mpergand, looks interesting.
                    I kinda already redesigned everything (I used a stylesheet for everyting).
                    I could try to use the QPainterPath and QGradient you listed in your post.
                    Thanks for your answer. I'll try to redesign the buttons, and reply once I'm done, or have some issues.

                    1 Reply Last reply
                    0
                    • M mpergand

                      If you doing cross platform apps, don't change anything and let Qt manage that.
                      On Mac, changing the color of one button will be ugly.
                      Your taste will be not the same as your users.

                      Or you should redesing a complete interface, some special apps like audio apps do that, Here the interface i use for synthetizer editors
                      But it's a lot of work.

                      S Offline
                      S Offline
                      Sucharek
                      wrote on last edited by Sucharek
                      #9

                      Hi @mpergand, so I played around with it, and I got some good result
                      Here's what it looks like: d2c48e55-5b6a-488e-81eb-06c42565872e-image.png
                      Thanks for the suggestion, I think it looks good :)
                      EDIT: Here's the stylesheet I used:

                      background-color: rgb(255, 15, 15);
                      color:black;
                      border: 3px solid rgb(150, 0, 0);
                      border-radius:10px;
                      
                      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