PDA

View Full Version : question about assigning a pixmap to an icon



Dark_Tower
11th April 2006, 12:06
Hi all, I have a QListWidget and I fill it with QListWidgetItems in icon mode. I set the icon size for this list to a specified size. My question is: if I assign a pixmap to an icon and then I set this icon to an item of the list, the icon will mantain the original pixmap internally or it will scale it? I ask this because I want to know if, before assigning the pixmap to the icon, it's better to scale it to the size of the icon to use less memory

Dark_Tower
11th April 2006, 18:34
No comments? :crying:

jpn
11th April 2006, 19:25
The original pixmap is maintained. You can add several pixmaps of different sizes to an icon.
During the paint, the best matching pixmap of the requested size is first searched and then scaled if needed.

Dark_Tower
12th April 2006, 09:34
Thanks a lot, jpn. That's a thing that I didn't knew and I will take it in account

nrabara
18th December 2009, 12:37
Hi J-P Nurmi,

I understood from your reply that when icon load the pixmap, original pixmap is maintained and resized to icon size.

But If the image size is large (in resolution 1024*768 etc), than Icon resizing to maintain original pixmap takes long time[ > 1 second on Desktop & >5 seconds on ARM board(200Mhz) ]

I am talking about showing image in Icon as thumbnail.

Can u guide/suggest me what should i do/read to reduce this time duration.

Thanks in advance
Nirav

nrabara
21st December 2009, 09:11
I would be glad if somebody put some highlight on above issue.

When showing image(size - 1024*786) as icon (size -64*64 ) why it take so long time in resizing to icon size.

Can we reduce this time or any other method ?