Forums

OverviewFelgo 2 Support (Qt 5) › using resources system with qml

Tagged: 

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

    sAMA SAMA

    I’m developing an app and in need of using images for the user interface, I have them all in the resources.qrc and they look like this:

    <RCC>
        <qresource prefix="/imgs">
            <file>assets/background.svg</file>
            <file>assets/background_1.svg</file>
            <file>assets/LOGO.png</file>
            <file>assets/Logo.svg</file>
        </qresource>
    </RCC>

    How do I use them?

    I tried both:

    //First trial:
    Image{
                source: "qrc:///imgs/assets/LOGO.png"
    }
    //Second Trial
    Image{
                source: "qrc:/imgs/assets/LOGO.png"
    }

    but nothing worked, am I missing something?

    Thanx

    #22120

    Alex
    Felgo Team

    Hi,

    if your resource file is correctly added to your *.pro file, you should be able to use the same relative paths as if you were using the assets in the deployment folders.

    Cheers,
    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.

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
FREE!
create apps
create games
cross platform
native performance
3rd party services
game network
multiplayer
level editor
easiest to learn
biggest time saving
best support