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

Array functions create "Object type function is not derived from QObject or QQmlComponent" warnings

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • 6.11
    • 6.7.0 RC2
    • QML: Compiler
    • None

    Description

      The following code

      import QtQuick
      import QtQuick.Controls.Basic
      
      Window {
          width: 640
          height: 480
          visible: true
          title: qsTr("Hello foo Button!")
      
          property list<Button> foo: []
          property bool hasFooButtons: foo.some(el => el.text === "foo")
      }
      

      generates a new message in 6.7.0rc

      Warning: Main.qml: Object type function is not derived from QObject or QQmlComponent. You may need to fully qualify all names in C++ so that moc can see them. You may also need to add qt_extract_metatypes(<target containing >). [compiler]
      

      which I can't seem to get rid of in the moment. Does it point to "something that I should do differently"?

      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
              cajus Cajus Pollmeier
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes