Results 1 to 5 of 5

Thread: QListView + row height

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Apr 2008
    Posts
    196
    Thanked 8 Times in 6 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows
    Wiki edits
    1

    Default QListView + row height

    Hey @all,

    how can I set the row height in a QListView?
    With a QTableView i can use setRowHeight() but how i can do it with a QListView?

    LG NoRulez

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

    Default Re: QListView + row height

    Either set the size using the SizeHintRole of the model or provide your own item delegate with reimplemented sizeHint().

  3. #3
    Join Date
    Jan 2011
    Location
    Sri Lanaka
    Posts
    64
    Thanks
    39
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60

    Default Re: QListView + row height

    Can i set rowsize using Stylesheet of QListWidget??

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

    Default Re: QListView + row height

    Use the ::item sub-control for QListWidget.
    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.


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

    deepal_de (4th May 2011)

Similar Threads

  1. How to Modify QListView item height?
    By blackfox in forum Qt Programming
    Replies: 7
    Last Post: 16th May 2012, 11:38
  2. Same height for QComboBox and QPushButton
    By cevou in forum Qt Programming
    Replies: 5
    Last Post: 12th May 2012, 07:56
  3. QListView word wrap
    By serega in forum Qt Programming
    Replies: 17
    Last Post: 30th August 2007, 03:13
  4. How can I get the Systray height ?
    By Nyphel in forum Qt Programming
    Replies: 3
    Last Post: 12th March 2007, 09:04
  5. height()
    By mickey in forum Newbie
    Replies: 1
    Last Post: 22nd March 2006, 20:32

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.