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

Provide a way to change QObject parent

XMLWordPrintable

      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.

        1. parenttest.qml
          3 kB
          Rusty Lynch
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

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

              Created:
              Updated:

                There are no open Gerrit changes