Results 1 to 2 of 2

Thread: Stretch Last Section

  1. #1

    Default Stretch Last Section

    The QTableWidget object have a property called horizontalHeaderStretchLastSection, which stretches the last section in the table when the window is resized. Is there an easy way to stretch the first section instead?

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

    Default Re: Stretch Last Section

    Yes. Access the horizontal header of the table and then call QHeaderView::setResizeMode() passing Stretch for the first section. You will also want to disable stretch on the last section.
    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.


Similar Threads

  1. QTableWidget stretch a column other than the last one
    By roleroz in forum Qt Programming
    Replies: 6
    Last Post: 4th February 2015, 06:35
  2. problems with layout - (stretch)
    By pakine in forum Qt Programming
    Replies: 3
    Last Post: 25th August 2010, 13:42
  3. How stretch icon in QPushButton?
    By cutie.monkey in forum Qt Programming
    Replies: 1
    Last Post: 8th July 2010, 08:54
  4. Can Layouts Stretch to Fit?
    By kylemhall in forum Newbie
    Replies: 2
    Last Post: 17th December 2009, 15:37
  5. stretch QTableWodgetItem
    By Shawn in forum Qt Programming
    Replies: 5
    Last Post: 5th September 2007, 09:49

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.