Results 1 to 6 of 6

Thread: question about assigning a pixmap to an icon

  1. #1
    Join Date
    Jan 2006
    Posts
    105
    Thanks
    38
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Question question about assigning a pixmap to an icon

    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
    Last edited by Dark_Tower; 11th April 2006 at 12:10.

  2. #2
    Join Date
    Jan 2006
    Posts
    105
    Thanks
    38
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: question about assigning a pixmap to an icon

    No comments?

  3. #3
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: question about assigning a pixmap to an icon

    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.
    J-P Nurmi

  4. #4
    Join Date
    Jan 2006
    Posts
    105
    Thanks
    38
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: question about assigning a pixmap to an icon

    Thanks a lot, jpn. That's a thing that I didn't knew and I will take it in account

  5. #5
    Join Date
    Sep 2008
    Posts
    58
    Thanks
    11
    Qt products
    Qt/Embedded
    Platforms
    Unix/X11

    Default Re: question about assigning a pixmap to an icon

    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

  6. #6
    Join Date
    Sep 2008
    Posts
    58
    Thanks
    11
    Qt products
    Qt/Embedded
    Platforms
    Unix/X11

    Default Re: question about assigning a pixmap to an icon

    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 ?

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.