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

Provide a way to change QObject parent

    XMLWordPrintable

Details

    Description

      If an object created via createObject() is passed a parent, and then later reparented, the object will still be destroyed when the original parent is destroyed.

      I did find that by initially passing in some other parent (like the toplevel scene that is known to never be destroyed till the app is exiting), and then just immediately set the parent to the target you intended, that this bug is not expressed.

      I'm attaching a qml file that demonstrates this.

      Attachments

        Issue Links

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

          Activity

            People

              Unassigned Unassigned
              rustylynch Rusty Lynch
              Votes:
              1 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes