Results 1 to 2 of 2

Thread: Weird problem resizing rows and columns in qtableview

  1. #1
    Join Date
    Feb 2008
    Posts
    79
    Thanks
    8
    Qt products
    Qt4
    Platforms
    Windows

    Default Weird problem resizing rows and columns in qtableview

    I have a problem when trying to resize rows and columns properly. Let me tell you whole story in short: at first I used resizeRowsToContents() and resizeColumnsToContents() and that worked properly. But I had severe performance hit running these functions. With testing I found out that resizeRowsToContents() is much slower than resizeColumnsToContents() (I usually have much more rows than columns), so I decided to keep resizeColumnsToContents() and remove resizeRowsToContents(). As an alternative I used:

    Qt Code:
    1. m_TableView->verticalHeader()->setDefaultSectionSize(150);
    To copy to clipboard, switch view to plain text mode 

    OK, now I have fixed height of rows. BUT... it has same strange side-effect that I dont understand. If I use that then suddenly my resizeColumnsToContents() does not work properly anymore, i.e. it does not resize columns properly. Can you please help me to find out what I'm doing wrong here?

  2. #2
    Join Date
    Feb 2008
    Posts
    79
    Thanks
    8
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Weird problem resizing rows and columns in qtableview

    Bump bump...

Similar Threads

  1. Problem when resizing rows in QTreeWidget
    By hubbobubbo in forum Qt Programming
    Replies: 0
    Last Post: 14th June 2010, 13:02
  2. Weird problem with QTableView::setResizeMode
    By winkle99 in forum Qt Programming
    Replies: 1
    Last Post: 20th March 2010, 04:16
  3. Resizing columns of a table?
    By qtzcute in forum Newbie
    Replies: 3
    Last Post: 16th August 2009, 10:07
  4. Resizing QTableWidget Columns
    By mbrusati in forum Qt Programming
    Replies: 4
    Last Post: 29th September 2008, 22:26
  5. Problem on Resizing of QTableView colums ?
    By rajeshs in forum Qt Programming
    Replies: 2
    Last Post: 28th March 2008, 04:03

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.