Results 1 to 2 of 2

Thread: Adjust Icons of images according to its gridsize or vice-versa in QlistWidget.

  1. #1
    Join Date
    Mar 2013
    Posts
    7
    Thanks
    1
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Adjust Icons of images according to its gridsize or vice-versa in QlistWidget.

    Hello,

    I am using Qlistwidget in my application. I want to adjust the size of the icons of the images of different sizes in the grid of Qlistwidget. i have tried setGridSize() function but it changes the size of all the items in widget. I want the size according to the size of icons. So please help me. I will
    really appreciate your help.
    Attached Images Attached Images

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Adjust Icons of images according to its gridsize or vice-versa in QlistWidget.

    I think you need to provide a custom delegate for this that will calculate the decoration size based on its real size and will draw it accordingly. But first you might try setting the iconSize() property of the list widget to an invalid size. I doubt it will help but it is worth to try.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. kde pid from window id and vice versa
    By sky in forum KDE Forum
    Replies: 2
    Last Post: 18th May 2013, 10:17
  2. Qstring to Qdate and vice versa
    By sai_3289 in forum Qt Programming
    Replies: 10
    Last Post: 12th February 2013, 12:54
  3. Replies: 3
    Last Post: 13th May 2011, 14:46
  4. Mapping JavaScript object to QT (and vice versa)
    By leoalvesmachado in forum Newbie
    Replies: 2
    Last Post: 30th June 2010, 20:00
  5. conversion between string to hex and vice versa
    By mohanakrishnan in forum Newbie
    Replies: 2
    Last Post: 5th December 2009, 12:25

Tags for this Thread

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.