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

"QtObject" C++ class breaks Qt global object in QML

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • Not Evaluated
    • None
    • 6.8.2, 6.9.1
    • None
    • Linux
    • Linux/X11

    Description

      Steps to reproduce:

      1. Create Qt Quick application using Qt Creator.
      2. Add a new QObject-derived class and name it as "QtObject".
      3. Build and run. Result: you can't call any methods of Qt object in QML. QML produces errors like main.qml:9: TypeError: Property 'size' of object QtObject(0x6519b095ff10) is not a function.

      Works fine under Windows/macOS/Android. It's a Desktop Linux-only issue.

      Attachments

        1. qtobject.zip
          4 kB
          Alexander Dyagilev
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            qtqmlteam Qt Qml Team User
            alervd Alexander Dyagilev
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes