42 self.__path = path |
42 self.__path = path |
43 return self |
43 return self |
44 |
44 |
45 return None |
45 return None |
46 |
46 |
|
47 @staticmethod |
|
48 def QComboBox_currentData(other, role=None): |
|
49 """ |
|
50 Public method to emulate the currentData method of Qt5. |
|
51 |
|
52 @param role role of which data should be retrived |
|
53 @return stored data at current selection |
|
54 """ |
|
55 import PyQt4.Qt |
|
56 if role is None: |
|
57 role = PyQt4.Qt.Qt.UserRole |
|
58 |
|
59 idx = other.currentIndex() |
|
60 return other.itemData(idx, role) |
|
61 |
47 def load_module(self, fullname): |
62 def load_module(self, fullname): |
48 """ |
63 """ |
49 Public method to load a module. |
64 Public method to load a module. |
50 |
65 |
51 @param fullname name of the module to be loaded (string) |
66 @param fullname name of the module to be loaded (string) |
67 module.QItemSelection = PyQt4.QtGui.QItemSelection |
82 module.QItemSelection = PyQt4.QtGui.QItemSelection |
68 module.QSortFilterProxyModel = \ |
83 module.QSortFilterProxyModel = \ |
69 PyQt4.QtGui.QSortFilterProxyModel |
84 PyQt4.QtGui.QSortFilterProxyModel |
70 module.QAbstractProxyModel = PyQt4.QtGui.QAbstractProxyModel |
85 module.QAbstractProxyModel = PyQt4.QtGui.QAbstractProxyModel |
71 module.QStringListModel = PyQt4.QtGui.QStringListModel |
86 module.QStringListModel = PyQt4.QtGui.QStringListModel |
|
87 |
|
88 PyQt4.QtGui.QComboBox.currentData = self.QComboBox_currentData |
72 return module |
89 return module |
73 |
90 |
74 sys.meta_path.insert(0, PyQt4Importer()) |
91 sys.meta_path.insert(0, PyQt4Importer()) |
75 |
92 |
76 if sys.version_info[0] == 2: |
93 if sys.version_info[0] == 2: |