Continued porting eric5 to PyQt5.

Wed, 02 Jul 2014 20:04:58 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Wed, 02 Jul 2014 20:04:58 +0200
changeset 3660
d396a5b64fc4
parent 3659
15efe6df020d
child 3663
83e22cb3b312

Continued porting eric5 to PyQt5.

Helpviewer/GreaseMonkey/GreaseMonkeyConfiguration/GreaseMonkeyConfigurationListDelegate.py file | annotate | diff | comparison | revisions
diff -r 15efe6df020d -r d396a5b64fc4 Helpviewer/GreaseMonkey/GreaseMonkeyConfiguration/GreaseMonkeyConfigurationListDelegate.py
--- a/Helpviewer/GreaseMonkey/GreaseMonkeyConfiguration/GreaseMonkeyConfigurationListDelegate.py	Wed Jul 02 19:53:03 2014 +0200
+++ b/Helpviewer/GreaseMonkey/GreaseMonkeyConfiguration/GreaseMonkeyConfigurationListDelegate.py	Wed Jul 02 20:04:58 2014 +0200
@@ -11,8 +11,9 @@
 from __future__ import unicode_literals
 
 from PyQt5.QtCore import Qt, QSize, QRect
-from PyQt5.QtGui import QFontMetrics, QPalette, QFont, QStyleOptionViewItemV4
-from PyQt5.QtWidgets import QStyle, QStyledItemDelegate, QApplication
+from PyQt5.QtGui import QFontMetrics, QPalette, QFont
+from PyQt5.QtWidgets import QStyle, QStyledItemDelegate, QApplication, \
+    QStyleOptionViewItem
 
 import UI.PixmapCache
 import Globals
@@ -59,7 +60,7 @@
         @param option style option used for painting (QStyleOptionViewItem)
         @param index model index of the item (QModelIndex)
         """
-        opt = QStyleOptionViewItemV4(option)
+        opt = QStyleOptionViewItem(option)
         self.initStyleOption(opt, index)
         
         widget = opt.widget
@@ -89,7 +90,7 @@
         # Draw checkbox
         checkBoxYPos = center - \
             GreaseMonkeyConfigurationListDelegate.CheckBoxSize // 2
-        opt2 = QStyleOptionViewItemV4(opt)
+        opt2 = QStyleOptionViewItem(opt)
         if opt2.checkState == Qt.Checked:
             opt2.state |= QStyle.State_On
         else:
@@ -163,7 +164,7 @@
         @return size hint (QSize)
         """
         if not self.__rowHeight:
-            opt = QStyleOptionViewItemV4(option)
+            opt = QStyleOptionViewItem(option)
             self.initStyleOption(opt, index)
             
             widget = opt.widget

eric ide

mercurial