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!

Forums

OverviewFelgo 2 Support (Qt 5) › Show VersionName variable from .pro in QML

Tagged: ,

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #23832

    Larry

    I would like to add an ABOUT screen to my app where I can show the VersionName variable defined in the .pro file

     

    Is this possible?  Any example of how to do this?

    #23838

    Larry

    For anyone else trying to do so, use QMAKE_SUBSTITUTE in your .pro file to convert qmake variables to a .h file, then expose the constants of the .h file to QML in your CPP using standard QML functions

    #23849

    Alex
    Felgo Team

    Hi Larry,

    you can also use the currently undocumented system context property in QML, like this:

    system.appVersionName
    system.appVersionCode

    Best,
    Alex

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

RSS feed for this thread

You must be logged in to reply to this topic.