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

Bad widget rendering/crash when using QTreeWidget inside QGroupBox

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 5.5.1
    • 5.5.0 RC, 5.5.0
    • None
    • Windows 7 + Visual Studio 2013, Win8.1+MinGW 4.9 32bit
    • 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
          bad.png
          17 kB
        2. good1.png
          good1.png
          19 kB
        3. good2.png
          good2.png
          20 kB
        4. treewidget.zip
          1 kB

        Issue Links

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

          Activity

            People

              dedietri Gabriel de Dietrich (drgvond)
              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