Results 1 to 2 of 2

Thread: Fixed column width in QAbstractTableModel

  1. #1
    Join Date
    Dec 2009
    Posts
    6
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Fixed column width in QAbstractTableModel

    How can i set fixed column widths in QAbstractTableModel based on table width? For example, column 1 has 5% of table witdh, column 2 has 25% etc. Is that possible?

  2. #2
    Join Date
    Jan 2006
    Location
    Kerala
    Posts
    371
    Thanks
    76
    Thanked 37 Times in 32 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Fixed column width in QAbstractTableModel

    I think this upto the view to decide how items are arranged. In your case you could create custom delegates and override its sizeHint().
    We can't solve problems by using the same kind of thinking we used when we created them

Similar Threads

  1. QTableWidget column width and resizing
    By shooogun in forum Qt Programming
    Replies: 2
    Last Post: 16th March 2008, 23:31
  2. Replies: 2
    Last Post: 11th March 2008, 14:30
  3. changing column width of QTableWidget
    By juliarg in forum Newbie
    Replies: 4
    Last Post: 22nd March 2007, 16:51
  4. Change column width in a QTreeWidget
    By mace in forum Qt Programming
    Replies: 2
    Last Post: 27th May 2006, 13:19
  5. QTable column stretchable with minimum Width
    By sunil.thaha in forum Qt Programming
    Replies: 0
    Last Post: 24th April 2006, 14:17

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.