Results 1 to 2 of 2

Thread: QTableWidget resizeColumnsToContents for whole table?

  1. #1
    Join Date
    Oct 2009
    Location
    Craiova, Romania
    Posts
    46
    Thanks
    3
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default QTableWidget resizeColumnsToContents for whole table?

    Hello!

    I need to resize the columns of a QTableWidget, but considering all the rows (including those not visible in the view port). I read that I need to implement sizeHintForColumn(), but I don't want that, because it is non-standard. Is there another way to do that in a nice manner in Qt?

  2. #2
    Join Date
    May 2009
    Location
    USA
    Posts
    300
    Thanks
    82
    Thanked 11 Times in 11 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QTableWidget resizeColumnsToContents for whole table?

    Did you try resizeColumnsToContents() ? Works for me.

Similar Threads

  1. Replies: 3
    Last Post: 20th January 2011, 13:24
  2. Replies: 3
    Last Post: 23rd November 2009, 13:41
  3. Replies: 0
    Last Post: 28th May 2009, 22:38
  4. QTableWidget - scrolling to bottom of the table
    By mkhoang in forum Qt Programming
    Replies: 4
    Last Post: 12th November 2008, 17:21
  5. Replies: 9
    Last Post: 21st June 2007, 10:27

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.