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. Need help identifying a graphical change on a QLabel
Qt 6.11 is out! See what's new in the release blog

Need help identifying a graphical change on a QLabel

Scheduled Pinned Locked Moved Solved General and Desktop
5 Posts 2 Posters 548 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.
  • V Offline
    V Offline
    viamodulo
    wrote on last edited by viamodulo
    #1

    When I disable a button the text of the QLabel becomes slightly blurred. Here's a picture : Here's a picture. Does anyone know what the name of this effect is ? I noticed it disappears if I put the TextFormat of the QLabel to QRichtext. Here's what it looks like when removed: Here's what it looks like when removed.

    I've also discovered that the extra outline color is QPalette::light() (white by default).

    1 Reply Last reply
    0
    • V Offline
      V Offline
      viamodulo
      wrote on last edited by
      #5

      Hey thanks ! That was a good idea, I found what it is. It's the QStyleHint::SH_EtchDisabledText that adds that behaviour.

      1 Reply Last reply
      2
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #2

        Hi and welcome to devnet,

        What is the relation between disabling a button and that QLabel ?

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        0
        • V Offline
          V Offline
          viamodulo
          wrote on last edited by
          #3

          The QLabel is the label of that button. It happens on other QLabels in the app that are not necessarily on buttons. It happens when they are disabled. (I disable the whole main window when showing a modal).

          1 Reply Last reply
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #4

            You can take a look at the implementation of QLabel's paintEvent to get started.

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply
            1
            • V Offline
              V Offline
              viamodulo
              wrote on last edited by
              #5

              Hey thanks ! That was a good idea, I found what it is. It's the QStyleHint::SH_EtchDisabledText that adds that behaviour.

              1 Reply Last reply
              2

              • Login

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