[Interest] rendering QTreeView bug

Joshua Grauman jnfo-c at grauman.com
Mon Oct 31 19:14:34 CET 2016


Hello all,

I have a QTreeView with a custom TreeModel. It works really well and I 
haven't had any problems with it after exhaustive testing. The QTreeView 
is in a widget inside a layout. It all looks great and works perfectly on 
screen. However, when I try to render the widget to a QImage to save, the 
QTreeView doesn't render properly at all. The rest of the widgets in the 
window render fine, the top row of the QTreeView renders right, but all 
the rest of the rows are badly distorted (squished vertically), and not 
drawn properly. Here is the code I use to render the entire window. I run 
this code inside of a timer (ie. not in the paint event).

mainWin->render(&img, QPoint(), QRegion(), QWidget::DrawChildren);

Thanks for any ideas as to what is going on!

Josh



More information about the Interest mailing list