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

Strange behaviours in QML warning, "Using attached type <TYPE> already initialized in a parent scope"

    XMLWordPrintable

Details

    • ac309fdee (dev), 1e4658cc0 (dev), 406bcf868 (6.8), 0fbb5c9f8 (6.7), b0fd8ef05 (dev), 9b3a8acef (6.8), 640d9e029 (6.7)

    Description

      The attached project (no pun intended) produces the warning,

      Using attached type Test already initialized in a parent scope.: Reference it by id instead:
      

      Strangeness:

      • Where the "repeated" attachment is made N levels deep, the warning is emitted N times for that line.
      • This warning is not emitted at all if "import QtQuick.Controls.Basic" is removed.
      • This warning is not emitted if our custom attached type is replaced by a "built-in" attached type (like Window.width or Keys.enabled)

      Attachments

        Issue Links

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

          Activity

            People

              sami.shalayel Sami Shalayel
              skoh-qt Sze Howe Koh
              Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: