Results 1 to 3 of 3

Thread: QTableView resizing to contents.

  1. #1
    Join Date
    Feb 2010
    Posts
    52
    Thanks
    6
    Thanked 2 Times in 2 Posts

    Default QTableView resizing to contents.

    Hi All,

    I'm calling resizeColumnsToContents() on a QTableView after having made changes to my model, eg, inserting rows etc., however am not seeing the resize working properly.

    I'm wondering - does the QTableView update itself in background when the model changes and am I calling the the resize too quickly ? It does work ok if I put a delay in before the resize.

    Cheers,
    Chris.

  2. #2
    Join Date
    Jun 2010
    Posts
    26
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QTableView resizing to contents.

    It works fine on QTableWidget. I find that these functions don't give the result I really want: a nicely spaced table filling the available space. I tend to have to calculate the size of the table and do all the sizing myself.

  3. #3
    Join Date
    Feb 2010
    Posts
    52
    Thanks
    6
    Thanked 2 Times in 2 Posts

    Default Re: QTableView resizing to contents.

    Cheers. Actually, I'm thinking now its a problem somewhere in my code. I do similar things in other places which are working ok.

Similar Threads

  1. QTableView and changing how a cell displays its contents
    By BitRogue in forum Qt Programming
    Replies: 2
    Last Post: 9th October 2009, 10:18
  2. Clear contents of a QTableView cell before repainting
    By aspidites in forum Qt Programming
    Replies: 2
    Last Post: 21st April 2009, 16:07
  3. QToolBox Resizing to contents??
    By kerwim in forum Qt Programming
    Replies: 1
    Last Post: 30th June 2008, 08:28
  4. Resizing QTableView
    By ghutchis in forum Qt Programming
    Replies: 3
    Last Post: 12th May 2008, 20:36
  5. Copying contents of QTableView cell to clipboard
    By Conel in forum Qt Programming
    Replies: 2
    Last Post: 18th April 2006, 15:50

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.