← Back to team overview

ubuntu-phone team mailing list archive

Re: theme.name and qrc

 

So, how can I theming my app, when I want use qrc?
Dne 1. 3. 2016 11:53 napsal uživatel "Zsombor Egri" <
zsombor.egri@xxxxxxxxxxxxx>:

> The simple answer is: you cannot. The theme.name is not a file path, it's
> a URL.
>
> On Mon, Feb 29, 2016 at 1:30 PM, Petr Štětka <stetka.peta@xxxxxxxxx>
> wrote:
>
>> Hi,
>> I want to load my theme that I have with other files in qml.qrc (Resource
>> Collection Files)
>> like this:
>>
>> <RCC>
>>     <qresource prefix="/">
>>         <file>qml/main.qml</file>
>>         <file>qml/LightTheme/parent_theme</file>
>>         <file>qml/LightTheme/ButtonStyle.qml</file>
>>         <file>qml/LightTheme/Palette.qml</file>
>>     </qresource>
>> </RCC>
>>
>>
>> Unfortunately, when I try to load it with this:
>>
>> theme.name = "qrc:///qml/LightTheme"
>>
>> or with:
>>
>> theme.name = "LightTheme"
>>
>>
>> It does not work:
>>
>> Theme not found: "qrc:///qml/LightTheme"
>>
>> So how can I load a my theme from qrc?
>>
>> Petr Štětka
>>
>> --
>> Mailing list: https://launchpad.net/~ubuntu-phone
>> Post to     : ubuntu-phone@xxxxxxxxxxxxxxxxxxx
>> Unsubscribe : https://launchpad.net/~ubuntu-phone
>> More help   : https://help.launchpad.net/ListHelp
>>
>>
>

Follow ups

References