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

QML Loader forgets source parameters after "active" change

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.15.3
    • 5.14.0, 5.14.1, 5.14.2
    • None
    • All
    • a135f3d6c3202b37eda0f1e94292f795f9e575ca (qt/qtdeclarative/dev) c57b803e26c3f98b4f22bcc0f1029fb963e92b0e (qt/tqtc-qtdeclarative/tqtc/lts-5.15)

    Description

      When using setSource with parameters on a QML Loader, the parameters will be ignored when the active property get set true the second time.

       

      Loader { id: loader; active: false } Component.onCompleted: loader.setSource("RedSquare.qml", { x: 100, y: 100, color: "blue" }) 
      

      Setting the Loader to active = true will show a blue square at (100, 100).

      Setting the Loader to active = false and again to true shows a red square at (0, 0) (as in RedSquare.qml)

      This was working perfectly fine before Qt 5.14

       

       

      Attachments

        1. LoaderTest.zip
          5 kB
          Robert Ziegler
        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
            robertziegler Robert Ziegler
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes