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

border-radius does not clip background and does not draw border in popup modus

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reported
    • Priority: P3: Somewhat important
    • Resolution: Unresolved
    • Affects Version/s: 5.4.0
    • Fix Version/s: None
    • Component/s: Widgets: Style Sheets
    • Labels:
      None
    • Environment:
      Qt5.4.0 64bit on 64 bit Win7

      Description

      I have a QFrame that is used as a drop-down panel, and which has the Qt::Popup flag set. When setting a border-radius, the background is not clipped properly.

      The stylesheet:
      QFrame

      { border: 1px solid green; background-color: red; border-top-right-radius: 0; border-top-left-radius: 0; border-bottom-right-radius: 5px; border-bottom-left-radius: 5px; }

      The attachment shows the bottom corners. I also tried setting `border-radius: 5px` to set a radius on all corners. Then the bottom corners look the same, and the top corners look as shown in the attachments. It seems the top right corner is the only location where an actual rounded border is drawn, allthough still the background is not clipped.

      When using rounded borders on 'normal' widgets in the UI, everything is oke. It is only on this frame, that has the Qt::Popup flag set, and which is continuously hidden and shown, where the problem occurs.

        Attachments

        1. border-bottom-left.png
          border-bottom-left.png
          0.4 kB
        2. border-bottom-right.png
          border-bottom-right.png
          0.4 kB
        3. border-top-left.png
          border-top-left.png
          0.5 kB
        4. border-top-right.png
          border-top-right.png
          0.4 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              jsvanbethlehem J van Bethlehem
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:

                Gerrit Reviews

                There are no open Gerrit changes