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

Stylesheet border-radius alpha channel colour issues

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P4: Low
    • None
    • 5.15.7, 6.4.2
    • GUI: Painting
    • None
    • Windows

    Description

      May be a duplicate of: https://bugreports.qt.io/browse/QTBUG-45577

      QPushButton pushBtn; 
      pushBtn.setFixedHeight(100); 
      pushBtn.setFixedWidth(100);
      pushBtn.setStyleSheet(R"(
      QPushButton {
          color: "white";
          border: 10px solid rgba(255, 255, 255, 0.3);
          border-radius: 50px;
          background: "black";
          padding: 5px;
      }
      )");

      Result:

      Replacing:

      https://github.com/qt/qtbase/blame/2b94453cbdab5c691c830ff539e81408d5330e3b/src/gui/painting/qcssutil.cpp#L107

      With:

      pen.setCapStyle(Qt::FlatCap);

      Fixes the issue as it stops the overlapping, but not sure of the side effects, the comment implies that it was there for a reason.

      Thoughts?

      Attachments

        Issue Links

          Activity

            People

              vgt Eirik Aavitsland
              tummon Cathal Tummon
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: