OverviewFelgo 2 Support (Qt 5) › Global configuration

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



    I need in my program a simple object of configuration data (e.g. URL of webservices, etc). I can be static and set only during complilation, but it should by easily accessible through application modules. What do you advice to use in this case? Next step could be dynamic configuration kept in some datastorage, but it is not necessary at the moment.


    Felgo Team


    For simple configuration objects, we recommend to create a singleton type in QML. Singletons are directly usable from any QML file after importing the type.

    Our Slot Game tutorial includes a short section about adding a singleton:

    You can also find singletons in many of our open-source demos, for example the Qt World Summit App (qml/common/DataModel.qml) or One Card (qml/common/Constants.qml)

    Hope this helps!


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

RSS feed for this thread

You must be logged in to reply to this topic.

Voted #1 for:

  • Easiest to learn
  • Most time saving
  • Best support

Develop Cross-Platform Apps and Games 50% Faster!

  • Voted the best supported, most time-saving and easiest to learn cross-platform development tool
  • Based on the Qt framework, with native performance and appearance on all platforms including iOS and Android
  • Offers a variety of plugins to monetize, analyze and engage users
create apps
create games
cross platform
native performance
3rd party services
game network
level editor
easiest to learn
biggest time saving
best support