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

WA_StaticContents broken on Windows in Qt5

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Not Evaluated
    • None
    • 5.1.1
    • Windows 32bit VS2012
      Windows 64bit VS2012
      Windows 64bit VS2012 OpenGL

      LGPL Qt Kit 5.1.1 via online installer
    • 8a44758f35c20c6cce6b61bab88211ef49b7099e

    Description

      Qt::WA_StaticContents is used to restrict the region of a QPaintEvent to the actual dirty region. This worked as advertised in Qt4 in OSX and Windows (modulo a bug in the Core Graphics Engine, which I also reported). In Qt 5.1.1, the attribute is completely ignored on Windows.

      Simply drop this line into the paintEvent in the 'scribble' example which ships with Qt, and see that the dirty region is the entire window.

      for( const QRect& rect : event->region().rects() )
      qDebug() << rect;

      Output:
      QRect(0,0 500x479)
      QRect(0,0 501x479)
      QRect(0,0 504x480)
      QRect(0,0 507x482)
      QRect(0,0 513x483)
      QRect(0,0 521x485)
      QRect(0,0 529x486)
      QRect(0,0 535x486)
      QRect(0,0 543x489)
      QRect(0,0 550x489)
      QRect(0,0 557x489)

      IMHO this is a fairly serious performance regression, particularly for large data-driven widgets such as grids, lists, and trees.

      Attachments

        Activity

          People

            peppe Giuseppe D'Angelo
            sccolbert Chris Colbert
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: