diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/qtreeview/tst_qtreeview.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/auto/qtreeview/tst_qtreeview.cpp b/tests/auto/qtreeview/tst_qtreeview.cpp index d19f93f..05b2e3c 100644 --- a/tests/auto/qtreeview/tst_qtreeview.cpp +++ b/tests/auto/qtreeview/tst_qtreeview.cpp @@ -3001,6 +3001,16 @@ void tst_QTreeView::styleOptionViewItem() view.setFirstColumnSpanned(2, QModelIndex(), true); view.setAlternatingRowColors(true); + { + // Test the rendering to pixmap before painting the widget. + // The rendering to pixmap should not depend on having been + // painted already yet. + QItemSelection sel(model.index(0,0), model.index(0,modelColumns-1)); + QRect rect; + view.aiv_priv()->renderToPixmap(sel.indexes(), &rect); + QTRY_VERIFY(delegate.count == visibleColumns); + } + delegate.count = 0; delegate.allCollapsed = true; view.showMaximized(); |