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

Forums

OverviewFelgo 3 Support (Qt 5) › Felgo Live client cannot load custom types definied by qmlRegisterType

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

    Cezary

    In my application created for Android, iOS and Linux desktop (not for Windows!) I have few types registered like

    qmlRegisterType<StatusBar>("StatusBar", 0, 1, "StatusBar");
    qRegisterMetaType<NavigationType>("NavigationType");
        qmlRegisterUncreatableType<NavigationTypeClass>("navigationtypes", 1, 0, "NavigationTypes", "Not creatable as it is enum type");

    where StatusBar is in fact very simply QObject inheritor with few basic properties and NavigationTypeClass is enum type.

     

    All these kind of types are loaded in Main.qml file created at application startup.

    import navigationtypes 1.0
    import StatusBar 0.1

     

    And in Desktop Live Client (first option) and with live client on iPhone I got errors:

    file:app/qml/Main.qml:14: module “StatusBar” is not installed
    file:app/qml/Main.qml:13: module “navigationtypes” is not installed

     

    If I run on Android or use Live Client (3rd option) I can run application without these errors.

    In fact my main problem is to run live my application on my iPhone without using Mac and XCode like you are promissing, but as for now I cannot achieve my goal.

    What I do wrong?

    #24547

    Alex
    Felgo Team

    Hi,

    the problem is that C++ code requires a compilation step, there is no way around this. The default Live Client apps on any platform will only allow QML/JS based apps to fully run.

    In order to use custom C++ (or native code and libraries) together with QML hot reload, you can make use of the Live Client Module: https://felgo.com/doc/qml-hot-reload-felgo-live/#c-native-code-build-your-own-live-clients-with-the-felgo-live-module

    This allows you to build and deploy your app, including any custom C++ code, and turn it into a Live Client itself. This requires a Mac as well.

    If you want to build and deploy your application to iOS without a Mac, you can also make use of Felgo Cloud Builds: https://felgo.com/cloud-builds

    Best,
    Alex

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