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

QTreeView: painting custom QStyle::PE_FrameFocusRect leaves artifacts

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • P2: Important
    • None
    • 5.9.6, 5.11.1
    • Widgets: Styles
    • None
    • macOS, Windows

    Description

      The sample project (.zip file attached) creates a QTreeView and paints a custom focus frame (QStyle::PE_FrameFocusRect). Painting itself works, but it seems the items that go out of focus are not invalidated, hence visual artifacts of the focus frame are left behind. Hovering the mouse cursor over such an item causes a repaint and erases the leftovers. Here's what it looks like:

       

      Observations:

      1. Problem doesn't occur with pen size 0, does occur with anything larger than that.
      2. Problem doesn't occur if painting a fillRect with a solid brush.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            alexium Alex
            alexium Alex
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes