Learn what Felgo offers to help your business succeed. Start your free evaluation today! Felgo for Your Business

Forums

OverviewFelgo 3 Support (Qt 5) › V-play live "ReferenceError: is not defined" problem

Tagged: 

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #20807

    Pawel

    Hello,

    I got this weird problem, I made everything like in this example:
    https://felgo.com/cross-platform-development/how-to-expose-a-qt-cpp-class-with-signals-and-slots-to-qml#how-to-access-a-cpp-object-from-qml

    and everything works when I connect trough deskop – I can acces to cpp object from:

    Data* dataClass = new Data();
    engine.rootContext()->setContextProperty("dataObj", dataClass);

    and everything is working, but while connecting on the phone, the output is: ReferenceError: dataObj is not defined

    It’s weird because I guess this should work on every device, right?

     

    #20820

    Günther
    Felgo Team

    Hi,

    the Live Client supports to preview QML files, which are parsed at runtime. C++ code requires to be compiled with your app and is thus not available with the default Felgo Live app.

    To test your C++ additions on mobile, you can manually build and deploy your app for iOS or Android, as described in our deployment guide: https://felgo.com/doc/vplay-deployment/.

    It is also possible to build a custom Live Client that also includes your custom Qt C++ code. For this, you can turn your own app project into a Live Client. You can find a guide how to do this here: Live Code Reloading with Custom C++ and Native Code for Qt. After performing these steps, you can build and deploy your own live client for your app, which you can use instead of the preview app from the stores.

    Best,
    Günther

Viewing 2 posts - 1 through 2 (of 2 total)

RSS feed for this thread

You must be logged in to reply to this topic.

Qt_Technology_Partner_RGB_475 Qt_Service_Partner_RGB_475_padded