qresource Custom attributes?

  • Hey!
    qresource provide awesome feature, as for example "lang", attribute.

    <qresource lang="fr">
        <file alias="cut.jpg">cut_fr.jpg</file>
    //If the user's locale is French (i.e., QLocale::system().name() returns "fr_FR"), :/cut.jpg becomes a reference to the cut_fr.jpg image. 

    But I want add custom attribute, for example mode, and change images depend on current mode of application.

    <qresource mode="black">
        <file alias="cut.jpg">cut_black.jpg</file>
    <qresource mode="green">
        <file alias="cut.jpg">cut_green.jpg</file>

    Any possibilities?

  • I don't have answer to that qresource question, but I already gave in the other tread a way to use graphical effects (ColorOverlay) to change the color of images.

  • Thanks, but I interested exactly in attributes.

  • Lifetime Qt Champion


    AFAIK no, however you could use QFileSelector and organise your files differently.

    Hope it helps

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.