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. Gradient interacts with parent widget's color?!
Forum Updated to NodeBB v4.3 + New Features

Gradient interacts with parent widget's color?!

Scheduled Pinned Locked Moved Solved General and Desktop
6 Posts 4 Posters 478 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.
  • A Offline
    A Offline
    Adam Crowe
    wrote on last edited by Adam Crowe
    #1

    Hello,

    I have a simple parent QWidget with a nice gradient defined in its stylesheet and that's all great. I've also got a QPushButton on that parent QWidget with its own nice linear gradient and that's good too except that the color of the QPushButton's gradient changes dramatically depending on its position over the parent's gradient. It seems to have a blend mode of some kind to made it stand out against a background. Is there a way to stop that from happening?

    Here's an example. This is the very same QPushButton just at a different position on its parent QWidget:

    alt text
    alt text

    By the way, the bottom image is the closest to the colors defined in the gradient.

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

      It may suprising you but the background colors of the two buttons are the same :)

      jsulmJ 1 Reply Last reply
      3
      • M mpergand

        It may suprising you but the background colors of the two buttons are the same :)

        jsulmJ Offline
        jsulmJ Offline
        jsulm
        Lifetime Qt Champion
        wrote on last edited by
        #3

        @mpergand @Adam-Crowe Optical illusion :-)

        https://forum.qt.io/topic/113070/qt-code-of-conduct

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

          Hi
          Pretty strong Optical illusion :)
          alt text

          1 Reply Last reply
          1
          • A Offline
            A Offline
            Adam Crowe
            wrote on last edited by
            #5

            Sweet Baby Jesus! ε(´סּ︵סּ`)з

            Apologies for the brain fart.

            mrjjM 1 Reply Last reply
            0
            • A Adam Crowe

              Sweet Baby Jesus! ε(´סּ︵סּ`)з

              Apologies for the brain fart.

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

              @Adam-Crowe
              Hi
              well it was a fair fart - so to speak :)
              I had to look at it in a drawing app as it really looks darker at top.

              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