Results 1 to 7 of 7

Thread: How to set the QTableWidget's columns width to fit the widget

Threaded View

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

    Default Re: How to set the QTableWidget's columns width to fit the widget

    Use this
    Qt Code:
    1. QTableWidget::horizontalHeader().setStretchLastSection(true);
    To copy to clipboard, switch view to plain text mode 
    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:

    rawfool (5th June 2013)

Similar Threads

  1. Replies: 0
    Last Post: 12th November 2012, 13:12
  2. Width QTableView for QCombobox with multiple columns
    By visor_ua in forum Qt Programming
    Replies: 7
    Last Post: 21st June 2011, 10:54
  3. Replies: 1
    Last Post: 13th August 2010, 06:28
  4. set the width of the columns of QTableView
    By zhanglr in forum Qt Programming
    Replies: 6
    Last Post: 31st July 2008, 15:29
  5. Replies: 1
    Last Post: 19th September 2007, 10:32

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
  •  
Qt is a trademark of The Qt Company.