October 26, 2011

modelvincent modelvincent
Lab Rat
1 posts

problem with PNG in QML under wince?

 

Hello,

I am making an application under windows CE 5 with QML and Qt 4.7.3 and I have a problem with PNG files.

The QML file is a rectangle for the window containing many IMAGE (in PNG format) and i switch between the different page by hiding or making visible the items.

All pictures are also loaded at the startup of the application.

And I have a problem when I want to add a new IMAGE object, when I run the QML under windows XP (Qt Creator), all is working perfectly, but when I run it under wince, I have an error message at the startup of the application (a message with ASSERT: ‘bitmap’ and a second message appear immediately in front of this previous message with ASSERT: ‘pixel’).

If I remove the last IMAGE object, the application is working correctly under wince, but if I add the IMAGE object, and that I remove the png used for the wallpaper of my application, it’s working correctly.

I suppose that I have a problem with the size of all the pictures loaded but they represent only about 1 Mo of memory (I have at least 50Mo of RAM free).

I don’t know how to solve my problem, because i have a lot of other picture to add to my application.

Regards,

Vincent

4 replies

October 27, 2011

SteveKing SteveKing
Lab Rat
86 posts

Hi Vincent,

Are you using Qt with static link or dynamic linking?

If you’re using dynamic linking and you’ve got all of the Qt Dlls in with the application then you will almost certainly hit the WinCE 5 32MB limit. There was an excellent talk about this at the 2009 dev days but I can’t find it at the moment. In summary if you add up the size of all the Dlls you use and subtract that from 32MB that’s how much memory you’ve got to spare. If you’re running everything you need for QDeclarative that will be ~0!

You can customise the Qt build to only include the things you need, for example if you’re using QML you can get rid of most of the widget based classes from QtGui, but be aware memory will always be tight.

KDAB [kdab.com] have done some work on this so you might want to contact them for some help.

Hope this is of some help,
Steve

October 27, 2011

modelvincent modelvincent
Lab Rat
1 posts

Thanks for your help,

Effectively you were right, i’ve tried my application under wince 6 and no problem, it’s working perfectly.
Thanks,

Regards,

Vincent

March 13, 2012

justzx justzx
Lab Rat
15 posts

I want to use qml on wince6.0, my sdk is TE6410 Board,but i don’t know how to configure my ide and project,can you give me a simple Tutorials?

March 13, 2012

SteveKing SteveKing
Lab Rat
86 posts

@justzx: There are some good docs [qt-project.org] on compiling Qt for WinCE6.

I found it took me a little while to get my head around the configuration, but stick with it.

For the IDE, Qt Creator doesn’t recognise WinCE toolchains yet (the bug is fixed but not released yet) so you’ll have to build it from the command line. If you’re using Visual Studio then simply get the Qt VS plugin and you will be able to build and deploy to the target.

Sorry that the above is a bit vague, but I would suggest giving the docs a try and then starting a new thread here if you get into trouble. The IRC groups are also very useful, although I don’t know how many WinCE folks are on them.

 
  ‹‹ Highlight problem for ListView entry when button pressed      Poor-quality video in qtmobility player. ››

You must log in to post a reply. Not a member yet? Register here!