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

Broken painting of empty item views with QGraphicsOpacityEffect applied

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 5.12.1
    • None
    • macOS, Windows

    Description

      Looks like painting of empty item views with QGraphicsOpacityEffect is broken. When at least one item is added, it is all ok. In more complex applications it causes a significant elevation of CPU/GPU usage. I know, that Qt 5.9.6 was not affected by this bug.

       

      Appears that this issue have a workaround. We can add a header and set it's height to 0 to "hide" it. The main thing is that item view must have something drawn inside, to bring it's painting loop back to normal and do not repaint recursively.

      ui->treeWidget->setHeaderHidden( false );
      QHeaderView *headerView = ui->treeWidget->header();
      headerView->setSectionsClickable( false );
      headerView->setSectionsMovable( false );
      headerView->setSectionResizeMode( QHeaderView::Fixed );
      headerView->setMaximumHeight( 0 );
      

      Attachments

        1. broken_painting.mp4
          130 kB
        2. qt_opacity_bug.zip
          2 kB
        3. qtbug-73724.zip
          2 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            vgt Eirik Aavitsland
            artem_bodrin Artem Bodrin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes