Results 1 to 4 of 4

Thread: Word wrapping in a QTableWidget cell

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Apr 2007
    Posts
    4
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Word wrapping in a QTableWidget cell

    Thanks for the tip!

    I wrote a QAbstractItemDelegate subclass which implements paint() and sizeHint(), but while the paint() function is being called nicely, it doesn't look like the sizeHint() function is being called. I am using my subclass as a QTableWidget's item delegate, and without my sizeHint() being called, the table's cells are never sized to the correct height.

    Do I need to do anything special to get my subclass's sizeHint() function to be called from the QTableWidget?

  2. #2
    Join Date
    Apr 2007
    Posts
    4
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Word wrapping in a QTableWidget cell

    I found it.

    QTableView::resizeRowsToContents()

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

    wendelmaques (8th November 2011)

Similar Threads

  1. Center a widget in a cell on a QTableWidget
    By roleroz in forum Qt Programming
    Replies: 16
    Last Post: 5th March 2009, 14:47
  2. Word wrapping
    By bruccutler in forum Qt Programming
    Replies: 4
    Last Post: 26th February 2007, 16:33
  3. Selection of cell with QWidget in QTableWidget
    By Tamara in forum Qt Programming
    Replies: 7
    Last Post: 17th February 2007, 14:11
  4. word wrapping in QTable Cell
    By joseph in forum General Discussion
    Replies: 0
    Last Post: 27th November 2006, 09:30
  5. Replies: 3
    Last Post: 8th September 2006, 18:54

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.