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

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.

Qt_Technology_Partner_RGB_475 Qt_Service_Partner_RGB_475_padded