Results 1 to 2 of 2

Thread: QTableWidget/View resizeColumnsToContents not respected until scroll (PyQt4)

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #2
    Join Date
    Mar 2011
    Location
    Hyderabad, India
    Posts
    1,882
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows
    Thanks
    3
    Thanked 453 Times in 435 Posts
    Wiki edits
    15

    Default Re: QTableWidget/View resizeColumnsToContents not respected until scroll (PyQt4)

    You need to call resizeColumnsToContents() when every QTrewWidget is scrolled, and when every QTreeWidget has items added/removed.
    When you know how to do it then you may do it wrong.
    When you don't know how to do it then it is not that you may do it wrong but you may not do it right.

  2. The following user says thank you to Santosh Reddy for this useful post:

    BreakBad (22nd April 2013)

Similar Threads

  1. QSortFilterProxyModel search and view scroll help
    By waynew in forum Qt Programming
    Replies: 1
    Last Post: 10th November 2011, 01:58
  2. pyqt4 reading values from rows of QTableWidget
    By stephen76 in forum Newbie
    Replies: 2
    Last Post: 10th January 2011, 09:55
  3. PyQt4 - Inserting data from array to QTableWidget
    By phosse1 in forum Qt Programming
    Replies: 1
    Last Post: 22nd December 2010, 20:20
  4. QTableWidget resizeColumnsToContents for whole table?
    By lalesculiviu in forum Qt Programming
    Replies: 1
    Last Post: 2nd March 2010, 00:08
  5. Scroll View for Canvas
    By Kapil in forum Qt Programming
    Replies: 10
    Last Post: 25th March 2006, 07:19

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.