Results 1 to 4 of 4

Thread: How to set rows of QtableWidget to the same height?

  1. #1
    Join Date
    Aug 2008
    Posts
    28
    Qt products
    Qt4
    Platforms
    Unix/X11

    Question How to set rows of QtableWidget to the same height?

    How to set rows of QtableWidget to the same height?

  2. #2
    Join Date
    Aug 2008
    Location
    Ukraine, Krivoy Rog
    Posts
    1,963
    Thanked 370 Times in 336 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: How to set rows of QtableWidget to the same height?

    you can use method QHeaderView::resizeSections.
    Qt Assistant -- rocks!
    please, use tags [CODE] & [/CODE].

  3. #3
    Join Date
    Aug 2008
    Posts
    28
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: How to set rows of QtableWidget to the same height?

    I need to set height of all rows to be 5.
    How it can be done with QHeaderView::resizeSections.

  4. #4
    Join Date
    Aug 2008
    Location
    Ukraine, Krivoy Rog
    Posts
    1,963
    Thanked 370 Times in 336 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: How to set rows of QtableWidget to the same height?

    look at this method QHeaderVew::setDefaultSectionSize, e.g.
    Qt Code:
    1. ...
    2. tableWidget->verticalHeader()->setDefaultSectionSize(50);
    3. ...
    To copy to clipboard, switch view to plain text mode 
    Qt Assistant -- rocks!
    please, use tags [CODE] & [/CODE].

Similar Threads

  1. Set height of QTableView to fit exact number of rows.
    By Ben.Hines in forum Qt Programming
    Replies: 3
    Last Post: 17th January 2019, 01:49
  2. QtableWidget that don't accept drop item between rows?
    By sergiomar73 in forum General Programming
    Replies: 3
    Last Post: 15th October 2010, 21:55
  3. QTableWidget sorting with hidden rows
    By alex140773 in forum Qt Programming
    Replies: 0
    Last Post: 8th July 2008, 12:35
  4. QTableWidget (resizing rows, turning off selection, etc.)
    By kiss-o-matic in forum Qt Programming
    Replies: 6
    Last Post: 11th January 2007, 01:57
  5. Replies: 6
    Last Post: 5th March 2006, 21:05

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.