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. QT widget background problem
Qt 6.11 is out! See what's new in the release blog

QT widget background problem

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 3 Posters 536 Views 2 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.
  • D Offline
    D Offline
    DevM
    wrote on last edited by
    #1

    Hello,

    I'm having this problem where when adding widgets the background of the widget itself seems to be transparent unless it is a label

    Original widget (background all red):
    93176aed-225a-41a1-a80c-d99f254a803d-image.png

    After adding it to another widget:
    2109d7a2-1fe1-4724-bb98-1a6c05e149a7-image.png

    The Labels keep the background but the Widget lost its red background and its transparent thus showing that line in between the labels.

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      Not sure but you may want to check out autoFillBackground property.

      It's either that or simply different default QPalette for QLabel vs. base QWidget.

      (Z(:^

      1 Reply Last reply
      1
      • D Offline
        D Offline
        DevM
        wrote on last edited by
        #3

        Autofill or not it has the same result it seems :l.

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

          Hi,

          Can you provide a minimal compilable example that shows that behaviour ?

          What version of Qt are you using ?
          On what platform ?

          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

          • Login

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