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

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P3: Somewhat important P3: Somewhat important
    • None
    • 5.4.0
    • Widgets: Style Sheets
    • None
    • Qt5.4.0 64bit on 64 bit Win7

      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.

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

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

              Created:
              Updated:

                There are no open Gerrit changes