On 1/4/2016 8:38 AM, Elvis Stansvik wrote:
2016-01-04 16:19 GMT+01:00 Bob Hood <bho...@comcast.net>:
On 1/3/2016 7:30 PM, Bob Hood wrote:

Am I going to have to use a QTableView with a model in order to get the
height I need in each cell, or might this be a bug?


Since all my images are the same height, I solved this by directly calling
QTableWidget's inherited method setRowHeight().  This has expanded the row
height to fit the image content.  I can center images in that height in the
QStyledItemDelegate.paint() method if for some reason they don't fit
exactly.

However, it seemed more intuitive to me that the
QStyledItemDelegate.sizeHint() return value would cause the underlying
QTableView to make that adjustment for me.
I think you'll have to request that adjustment manually, with
resizeRowsToContents(). Not sure if you can have it done
automatically.

Hi, Elvis.

Yeah, I was doing that in the code as the last action. I just didn't include it in the original post.

_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to