Results 1 to 11 of 11

Thread: Icons in a QListWidget

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #5
    Join Date
    Dec 2008
    Posts
    7
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Icons in a QListWidget

    Quote Originally Posted by riklaunim
    To get a list of "icons" with text in a line, you could also use buttons with icons, and invisible borders set in a layout.
    There are some disadvantage for me:
    • I can't connect the ListWidget's rawChanged(int) with my stackWidget's setCurrentIndex(int)
    • I don't see any possibility to have the text under the icon


    Quote Originally Posted by QbelcorT View Post
    Hi,
    I recently had a similar issue with this. Try tweaking the gridsize http://doc.trolltech.com/4.3/qlistvi...#gridSize-prop.
    I've tried this. I changed the width of maximumSize and gridSize to 100, but it didn't change anything.
    Quote Originally Posted by QbelcorT View Post
    It also looks like the text width is fixed to the longest item. There is another option http://doc.trolltech.com/4.3/qlistvi...ItemSizes-prop, turn that off if it is set.
    This also didn't change anything. But it would be great if all icons have the same size.
    EDIT: Oh, it did work. The window in the designer wasn't updated, but afterwards I noticed the change in the preview. But uniform sizes would be really cool..
    Quote Originally Posted by QbelcorT View Post
    Also, play with the spacing attribute it may help.
    I found this in the Qt documentation: When a grid layout is in force the spacing property is ignored.

    A big thanks for all of your suggestions
    Last edited by LuHe; 26th December 2008 at 14:28. Reason: updated contents

Similar Threads

  1. no icons on the another machine (after installation)
    By roxton in forum Installation and Deployment
    Replies: 2
    Last Post: 4th July 2008, 18:24
  2. QListWidget Problem
    By pmabie in forum Qt Programming
    Replies: 1
    Last Post: 7th October 2007, 07:52
  3. Default size of a QListWidget inside a QDockWidget
    By rakuco in forum Qt Programming
    Replies: 0
    Last Post: 25th July 2007, 09:01
  4. QIcon Icons are not visible
    By harakiri in forum Qt Programming
    Replies: 1
    Last Post: 6th May 2007, 20:11
  5. Replies: 13
    Last Post: 15th December 2006, 12:52

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
  •  
Qt is a trademark of The Qt Company.