Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-26539

background-color: rgba(...) does not work on QDialog

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4: Low P4: Low
    • None
    • 4.8.0
    • GUI: Painting
    • None
    • Linux with Compiz

      I want to create a window with a translucent blue background. I don't want the entire window to be translucent, just the background: the controls on the window should be solid. Logically, I should be able to accomplish this with the style "background-color: rgba(0, 0, 255, 100)" but this does not work.

      I can work around the problem by setting Qt::WA_TranslucentBackground and then creating a widget with a blue background that fills the window, but this is an inelegant solution that requires an extra widget and special code for every translucent window.

      Could QDialog be fixed so that background-color: rgba(...) "just works"?

        1. TranslucencyDemo.tar.gz
          4 kB
        2. Expected result.png
          Expected result.png
          12 kB
        3. Actual result.png
          Actual result.png
          11 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            Unassigned Unassigned
            alex.henrie Alex Henrie
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes