From 22b7d211865c1505862627a2e65bcd063e314e45 Mon Sep 17 00:00:00 2001 From: David Faure Date: Fri, 3 Dec 2010 11:34:09 +0100 Subject: Set missing flags in the option when rendering QTreeView drag pixmap QAbstractItemViewPrivate::renderToPixmap was not setting all the flags that the normal QTreeView painting sets: option.showDecorationSelected, option.viewItemPosition (so the drag pixmap looked wrong on Windows 7, with rects around each cell), and then the unittest also discovered that State_Children/State_Sibling wasn't set either. Task-number: QTBUG-15834 Merge-request: 2517 (cherry picked from Qt4 commit d63910575949106f84dacf04abaa14fc866aa66b) Change-Id: I0a5014d960543c3ed8fea73d6df578e7e521b0e0 Reviewed-by: Stephen Kelly --- src/widgets/itemviews/qabstractitemview_p.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/widgets/itemviews/qabstractitemview_p.h') diff --git a/src/widgets/itemviews/qabstractitemview_p.h b/src/widgets/itemviews/qabstractitemview_p.h index 34c9ff2892..801bb82d85 100644 --- a/src/widgets/itemviews/qabstractitemview_p.h +++ b/src/widgets/itemviews/qabstractitemview_p.h @@ -197,6 +197,8 @@ public: #endif virtual QItemViewPaintPairs draggablePaintPairs(const QModelIndexList &indexes, QRect *r) const; + // reimplemented in subclasses + virtual void adjustViewOptionsForIndex(QStyleOptionViewItemV4*, const QModelIndex&) const {} inline void releaseEditor(QWidget *editor) const { if (editor) { -- cgit v1.2.3