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

Crash when calling QGraphicsProxyWidget::setWidget()

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.12.1
    • 4.6.1, 4.7.1
    • Widgets: GraphicsView
    • None
    • Qt 4.6.1 and Qt 4.7.1 with Windows 7 and MSVC 9.0
    • 794140fb86b470821e3a298a0ba9c8dbbee202b9 (qt/qtbase/5.12)

    Description

      We have found a corner case with QGraphicsProxyWidget where you can cause a crash when setting the proxied widget. I have attached an example program that can easily be converted to a regression test, and a patch to fix the issue.

      The basic repo is the following:

      • Create a parent and child QGraphicsProxyWidget
      • Connect the two items using setParentItem()
      • Call setWidget() on the parent with an initial widget.
      • Later call setWidget() again with a new widget for the parent.

      A crash occurs because a proxied widget has not been assigned to the child QGraphicsProxyWidget yet.

      Attachments

        1. main.cpp
          0.8 kB
        2. qgraphicsproxywidget.patch
          0.7 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            chehrlic Christian Ehrlicher
            aronbierbaum Aron Bierbaum
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes