Results 1 to 3 of 3

Thread: QListWidget (ModelBased) autosizing columns

  1. #1
    Join Date
    Aug 2009
    Posts
    56
    Thanks
    14
    Thanked 1 Time in 1 Post

    Default QListWidget (ModelBased) autosizing columns

    I thought this would be obvious but I can't find it.

    I'm using a QListWidget (Model based) and want to make the columns automatically expand their width so none of the rows have to span multiple lines. This means not all columns will have the same width. This is only when the QListWidget is created, the user can change it later if they want.

    What is the option for this?

    Thanks.

  2. #2
    Join Date
    Mar 2009
    Posts
    19
    Thanks
    3
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QListWidget (ModelBased) autosizing columns

    Does QTableView::resizeColumnsToContents() do what you want?

  3. The following user says thank you to negritot for this useful post:

    rakkar (14th September 2009)

  4. #3
    Join Date
    Aug 2009
    Posts
    56
    Thanks
    14
    Thanked 1 Time in 1 Post

    Default Re: QListWidget (ModelBased) autosizing columns

    Yes, thanks.

Similar Threads

  1. How to add columns in QListWidget ?
    By npc in forum Newbie
    Replies: 1
    Last Post: 15th February 2007, 07:20
  2. Replies: 13
    Last Post: 15th December 2006, 11:52

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.