diff -r d6bba153dd43 -r 33f1bcfdd65e E5Gui/E5ModelToolBar.py --- a/E5Gui/E5ModelToolBar.py Mon Mar 04 19:12:44 2013 +0100 +++ b/E5Gui/E5ModelToolBar.py Sat Mar 09 13:42:57 2013 +0100 @@ -7,7 +7,7 @@ Module implementing a tool bar populated from a QAbstractItemModel. """ -from PyQt4.QtCore import pyqtSignal, Qt, QModelIndex, QPoint, QEvent +from PyQt4.QtCore import pyqtSignal, qVersion, Qt, QModelIndex, QPoint, QEvent from PyQt4.QtGui import QApplication, QDrag, QPixmap, QToolBar, QIcon, QToolButton @@ -241,7 +241,10 @@ drag = QDrag(self) drag.setMimeData(self.__model.mimeData([idx])) actionRect = self.actionGeometry(act) - drag.setPixmap(QPixmap.grabWidget(self, actionRect)) + if qVersion() >= "5.0.0": + drag.setPixmap(self.grab(actionRect)) + else: + drag.setPixmap(QPixmap.grabWidget(self, actionRect)) if drag.exec_() == Qt.MoveAction: row = idx.row()