pass a QVariantList fron c++ to QML

  • Hi

    I need to pass a QVariantList from c++ to qml. I have trie the following but it seems to fail.
    mission - c++ class instance
    item - qml QQuickitem

    1. Using connection


    I have a function in qml file:
    function ongridListChanged(coordlist){

    but it gives an error

    No such slot QMLTYPE_1::ongridListChanged(QVariantList)

    1. using qmlRegisterType:

      It gives the error
      module "Mission" is not installed

    Any suggestions to get any of them working?

  • Qt Champions 2017

    @saitej said:


    Please see the example given in the assistant "Data Type Conversion Between QML and C++" for passing QVariantList

    Also Every cml document name need to start with Capital letter. Change like following. It should work.

  • @dheerendra


Log in to reply