maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   Embedded Qt Resources (https://talk.maemo.org/showthread.php?t=41213)

Dak 2010-01-18 18:00

Embedded Qt Resources
 
I have a Qt application that makes use of a couple of embedded png images. Nothing excessive.

Running under the x86 scratchbox target (I use ESBox btw) is fine - the images show up.

I recompile to ARMEL, no problem, and I can tell from the executable size that the images are embedded, yet when I run it on my N900 the images do not display.

I get no warnings or errors at all....any ideas?

rkm 2010-01-18 18:54

Re: Embedded Qt Resources
 
How are you loading the file, do you use the ":/" prefix in the Url?

Dak 2010-01-19 02:52

Re: Embedded Qt Resources
 
Yes. I apparently am doing it correctly, or the fremantle_x86 target wouldn't work. It is only when I recompile to the fremantle_armel target that it stops working. Very odd.

fyi my code looks like:

const QImage myImage(":/img/image1.png")

I then use myImage to paint the background of a dockable widget.


All times are GMT. The time now is 19:45.

vBulletin® Version 3.8.8