Results 1 to 5 of 5

Thread: Icon margin in QListView

  1. #1
    Join Date
    Apr 2009
    Posts
    32
    Thanks
    6
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Icon margin in QListView

    How do I control the margin/interspacing between the icons in a QListView? Have attached screenshot, were I believe a little extra 'white space' would be appropriate.
    Attached Images Attached Images

  2. #2
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Icon margin in QListView

    May be QListView::setIconSize might help you.

  3. #3
    Join Date
    Apr 2009
    Posts
    32
    Thanks
    6
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Icon margin in QListView

    Unfortunately not. It changes the icon size, but the margin is still zero (on Linux).

  4. #4
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Icon margin in QListView

    Then may be you will need to use delegates and set the icon rect properly there.

  5. The following user says thank you to aamer4yu for this useful post:

    mpi (1st July 2010)

  6. #5
    Join Date
    Apr 2009
    Posts
    32
    Thanks
    6
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Icon margin in QListView

    I think I'll leave it at the default behavior then. But thanks for the input.

Similar Threads

  1. icon glitch in QListView
    By trhaynes in forum Qt Programming
    Replies: 1
    Last Post: 31st August 2009, 19:48
  2. QListView icon double clicking
    By been_1990 in forum Qt Programming
    Replies: 8
    Last Post: 28th April 2009, 20:05
  3. Layout without margin??
    By zlosynus in forum Qt Programming
    Replies: 1
    Last Post: 2nd August 2008, 09:59
  4. zero'ing margin in a qhboxlayout
    By illuzioner in forum Qt Programming
    Replies: 3
    Last Post: 2nd July 2007, 10:54
  5. How to Set margin
    By suresh in forum Newbie
    Replies: 1
    Last Post: 5th October 2006, 06:13

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.