Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. [SOLVED] TypeError: Object has no method 'process' - BUT IT HAS
QtWS25 Last Chance

[SOLVED] TypeError: Object has no method 'process' - BUT IT HAS

Scheduled Pinned Locked Moved QML and Qt Quick
3 Posts 2 Posters 1.3k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • U Offline
    U Offline
    utcenter
    wrote on last edited by
    #1

    I have a problem with a C++ class I've exposed to the QML context.

    The object is wrongly recognized as a QAbstractListModel:

    bq. TypeError: Object QAbstractListModel(0x28fdfc) has no method 'process'

    but in fact the type is TestModel and it only inherits QAbstractListModel.

    The method itself is declared as a Q_INVOKABLE, I even get autocomplete suggestion in QML, but it complains the method does not exist.

    Any ideas?

    1 Reply Last reply
    0
    • R Offline
      R Offline
      Roland_R
      wrote on last edited by
      #2

      Can you provide more details (code)? I had no problem with exposing C++ objects to QML so far.

      1 Reply Last reply
      0
      • U Offline
        U Offline
        utcenter
        wrote on last edited by
        #3

        Yep, one more time I forget to include the Q_OBJECT macro - IDE code generation is spoiling me.

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved