Find the Best Demos and Examples

Check out this quick tour to find the best demos and examples for you, and to see how the Felgo SDK can help you to develop your next app or game!


OverviewFelgo 2 Support (Qt 5) › serving QML over network

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
  • #14491



    i just wanted to hear your opinion about serving QML Apps over the network?

    here is a url about it:

    I made a sample app which can do this, but it needs a QML starting point as of the v-play engine does not understand:


    so i would like to hear from v-play about this aproach.


    thanx in advance, bas


    Felgo Team

    Hi Bas,

    while this might not work with setting the root component to a remote one at the moment, you can use a Loader to load your qml files remotely.

    E.g. you can try this code in your Main.qml:

    import Felgo 3.0
    import QtQuick 2.0
    GameWindow {
      id: gameWindow
      screenWidth: 960
      screenHeight: 640
      Loader {
        source: ""

    The MainContent.qml file has the following content and is on our servers:

    import Felgo 3.0
    import QtQuick 2.0
    Scene {
      id: scene
      width: 480
      height: 320
      Rectangle {
        id: rectangle
        anchors.fill: parent
        color: "grey"
        Image {
          source: "vplay-logo.png" // this url is relative to the qml document's url, so it's taken from our server as well
          anchors.horizontalCenter: parent.horizontalCenter

          width: parent.width
          height: 100
          fillMode: Image.PreserveAspectFit
        Text {
          id: textElement
          text: "Hello Remote Felgo World"
          color: "#ffffff"
          anchors.centerIn: parent

    Is this sufficient for your use-case?




    hi Alex,


    thanx for the fast reply, as always 🙂

    yes this is what i had done in a working example, and works good.

    then i have put in a factory for network access management.

    engine.setNetworkAccessManagerFactory( new MyFactory());

    #ifndef MYFACTORY_H
    #define MYFACTORY_H
    #include <QObject>
    #include <QQmlNetworkAccessManagerFactory>
    #include <QNetworkAccessManager>
    #include <QNetworkDiskCache>
    class MyFactory : public QQmlNetworkAccessManagerFactory
        QNetworkAccessManager* create(QObject *parent)
            QNetworkAccessManager* manager = new QNetworkAccessManager( parent );
            QNetworkDiskCache* cache = new QNetworkDiskCache(manager);
            return manager;
    #endif // MYFACTORY_H

    but his works on desktop, did not tried on mobile device. and i think i need to change the cache directory.

    gr, Bas


    Felgo Team


    ah great!



    is there some way to track if all loading (including gfx and other data) is done?


    Felgo Team

    Felgo Team

    Also I think that the asynchronous property of the loader defaults to true for remote urls, which means you can actually see the qml source loading item by item, so you might want to set visible of the Loader to false while the loader is not ready, and show a loading animation instead.



    cool that works good,



    is there anything that could be different when creating an app this way?



    Felgo Team

    You will see 😀 We didn’t try something like this excessively, so not too much of experience we can share there. Keep us updated on how it is going!


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

RSS feed for this thread

You must be logged in to reply to this topic.