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

Crash when adding a layout with a parent layout item to another layout.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 4.6.1
    • 3.x
    • Widgets: Layout
    • None
    • ba9ea2b97bdd2329cb479bb7a6aef1bc7cee82d1

    Description

      The crash seems to be triggered by the following line:
      QGraphicsGridLayout *innerLayout = new QGraphicsGridLayout(widget);

      You don't have to pass the widget pointer here, (it will be reparented anyway). Changing that line to

      QGraphicsGridLayout *innerLayout = new QGraphicsGridLayout;

      will make the crash go away. This is recommended to do regardless of the resolution of this bug.

      Attachments

        1. layouttest.pro
          0.4 kB
        2. main.cpp
          1 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            smd Jan Arve
            smd Jan Arve
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes