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

Bad widget rendering/crash when using QTreeWidget inside QGroupBox

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P1: Critical
    • Resolution: Done
    • Affects Version/s: 5.5.0 RC, 5.5.0
    • Fix Version/s: 5.5.1
    • Labels:
      None
    • Environment:
      Windows 7 + Visual Studio 2013, Win8.1+MinGW 4.9 32bit
    • Commits:
      52e7aba6bf717c673151c9267040c7a90dbea039

      Description

      I have a QTreeWidget inside a QGroupBox. I initialize the tree widget as in the example attached: list of filenames + icons retrieved through QFileIconProvider.
      When I launch the application it is not properly rendered (see attached image bad.png): the headers or scrollbars are not shown/black, the items are not shown in the tree widget.
      If I resize the windows I get in the output a lot of warnings about

      [...]
      QPaintDevice: Cannot destroy paint device that is being painted
      QWidget::repaint: Recursive repaint detected
      [...]
      

      If I try to scroll the content (minimize to the minimum size the dialog and then drag the scrollbar), then I get a crash.

      The problem seems caused by a combination of the font used (Courier New) and the QFileIconProvider. If I do not set any font or icon, then the widget is properly rendered (see good1.png with no font change or good2.png with no icon set in the tree widget).

      This was not happening with Qt 5.4.1. It must be something changed in Qt 5.5.
      I reproduced this problem on Windows 7. I'm using Microsoft Visual Studio 2013

        Attachments

        1. bad.png
          17 kB
          Calogero Mauceri
        2. good1.png
          19 kB
          Calogero Mauceri
        3. good2.png
          20 kB
          Calogero Mauceri
        4. treewidget.zip
          1 kB
          Calogero Mauceri

          Issue Links

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

            Activity

              People

              Assignee:
              dedietri Gabriel de Dietrich (drgvond)
              Reporter:
              mauceri Calogero Mauceri
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes