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

States cause double creation of loader item on initialization.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P2: Important
    • None
    • 6.4.2
    • None
    • Windows

    Description

      The attached example sets the sourceComponent through the states property in a Loader. This component is created twice on initialization and will never be destructed.
      It is also active and could receive signals etc.

      The behavior could be examined by just loading main.qml.
      There you get the log message from line 52 twice. You also get two messages by pressing the triggerSomething button which emits a signal that the component consumes(plots a message).

      This behavior is tricky and could be fixed by activiting the Loader in Component.onCompleted.

      Attachments

        Issue Links

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

          Activity

            People

              qtqmlteam Qt Qml Team User
              cherold Christian von Wascinski
              Votes:
              2 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes