Results 1 to 3 of 3

Thread: QTableWidget Resize issue

  1. #1
    Join Date
    Jan 2006
    Location
    Ohio
    Posts
    332
    Thanks
    37
    Thanked 8 Times in 4 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default QTableWidget Resize issue

    This seems like it should be a trivial problem but I cannot seem to figure out how to solve this. I have a QTableWidget with a couple columns. When the user resizes the window and makes it bigger, I get this dead space on the right side of the table. Is there a way to have the columns fill the available space so there is no dead space on a resize? I don't want to resize to contents because the contents may be too small. Thanks!

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: QTableWidget Resize issue

    Set header view's resize mode to "stretch".
    J-P Nurmi

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

    ToddAtWSU (6th March 2008)

  4. #3
    Join Date
    Jan 2006
    Location
    Ohio
    Posts
    332
    Thanks
    37
    Thanked 8 Times in 4 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: QTableWidget Resize issue

    That worked...didn't realize it would be in the header view. Thanks!

Similar Threads

  1. QTableWidget resize
    By MarkoSan in forum Qt Programming
    Replies: 8
    Last Post: 16th January 2008, 14:18
  2. QComboBox in QTableWidget : display troubles.
    By Nyphel in forum Qt Programming
    Replies: 2
    Last Post: 13th October 2007, 23:29
  3. Replies: 2
    Last Post: 14th August 2007, 15:16
  4. postponing resize event
    By Honestmath in forum Qt Programming
    Replies: 11
    Last Post: 26th February 2006, 00:32

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.