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

QmlCompiler does not recognize a component within itself

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • 6.10
    • 6.5.3
    • QML: Compiler
    • None

    Description

      This should work:

      // A.qml
      QtObject {
           id: self
           property int a: 5
           function doSomething() : int {
               return self.a // self can only be an A
           }
      }
      

      This has come up several times already when trying to port things to be compiled to C++.

      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
            ulherman Ulf Hermann
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes