Toolbox/PyQt4ImportHook.py

changeset 5815
223fa32b3a32
parent 5814
50b299f6eb98
child 6048
82ad8ec9548c
equal deleted inserted replaced
5814:50b299f6eb98 5815:223fa32b3a32
9 9
10 from __future__ import unicode_literals 10 from __future__ import unicode_literals
11 11
12 import sys 12 import sys
13 import importlib 13 import importlib
14
14 15
15 class PyQt4Importer(object): 16 class PyQt4Importer(object):
16 """ 17 """
17 Class implementing an importer converting PyQt5 imports to PyQt4 18 Class implementing an importer converting PyQt5 imports to PyQt4
18 imports. 19 imports.
38 return None 39 return None
39 40
40 @staticmethod 41 @staticmethod
41 def QComboBox_currentData(other, role=None): 42 def QComboBox_currentData(other, role=None):
42 """ 43 """
43 Public method to emulate the currentData method of Qt5. 44 Static method to emulate the currentData method of Qt5.
44 45
45 @param role role of which data should be retrived 46 @param other reference to the combo box to get the user data of
47 @type QComboBox
48 @param role role of which data should be retrieved
49 @type int
46 @return stored data at current selection 50 @return stored data at current selection
51 @rtype any
47 """ 52 """
48 import PyQt4.Qt 53 import PyQt4.Qt
49 if role is None: 54 if role is None:
50 role = PyQt4.Qt.Qt.UserRole 55 role = PyQt4.Qt.Qt.UserRole
51 56

eric ide

mercurial