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

Warning during dynamic object creation

    XMLWordPrintable

Details

    Description

      Run the QML file:

      import QtQuick 2.0
      import QtQuick.Controls 1.2
      
      ApplicationWindow {
          id: root
          width: 600
          height: 600
          visible: true
          
          QtObject {
              id: parentObject
          }
          
          Component {
              id: childObjectComponent
              QtObject {}
          }
          
          Component.onCompleted: {
              childObjectComponent.createObject(parentObject, {})
          }
      }
      

      Warning appears:
      "QQmlComponent: Created graphical object was not placed in the graphics scene."

      What's wrong in dynamic creation of non-Item objects?

      Attachments

        1. notscene.qml
          0.4 kB
          Roman Valov
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            t.artikov Timur Artikov
            Votes:
            3 Vote for this issue
            Watchers:
            17 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes