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

QML tools cannot see Window.parent

    XMLWordPrintable

Details

    Description

      See https://doc-snapshots.qt.io/qt6-6.7/qml-qtquick-window.html#parent-prop

      Code

      import QtQuick
      
      Window {
          id: window
          width: 640
          height: 480
          visible: true
      
          Component.onCompleted: {
              console.log("window.transientParent:", window.transientParent) // OK
              console.log("window.parent:", window.parent) // [missing-property]
          }
      }
      
      

      qmlsc output

      Warning: Main.qml:11:40: Member "parent" not found on type "Window" [missing-property]
              console.log("window.parent:", window.parent)
                                                   ^^^^^^
      Warning: Main.qml:11:40: Could not compile binding for onCompleted: Cannot load property parent from QQuickWindowQmlImpl of . [compiler]
              console.log("window.parent:", window.parent)
                                                   ^^^^^^
      

      Attachments

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

        Activity

          People

            qtqmlteam Qt Qml Team User
            skoh-qt Sze Howe Koh
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes