9 |
9 |
10 from __future__ import unicode_literals |
10 from __future__ import unicode_literals |
11 |
11 |
12 import os |
12 import os |
13 |
13 |
14 from PyQt5.QtCore import QModelIndex, pyqtSignal, QUrl, Qt, qVersion, \ |
14 from PyQt5.QtCore import QModelIndex, pyqtSignal, QUrl, Qt, QCoreApplication, \ |
15 QCoreApplication, QItemSelectionModel, QElapsedTimer |
15 QItemSelectionModel, QElapsedTimer |
16 from PyQt5.QtGui import QDesktopServices |
16 from PyQt5.QtGui import QDesktopServices |
17 from PyQt5.QtWidgets import QTreeView, QApplication, QMenu, QAbstractItemView |
17 from PyQt5.QtWidgets import QTreeView, QApplication, QMenu, QAbstractItemView |
18 |
18 |
19 from E5Gui.E5Application import e5App |
19 from E5Gui.E5Application import e5App |
20 from E5Gui import E5FileDialog, E5MessageBox |
20 from E5Gui import E5FileDialog, E5MessageBox |
163 self.setAlternatingRowColors(True) |
164 self.setAlternatingRowColors(True) |
164 |
165 |
165 header = self.header() |
166 header = self.header() |
166 header.setSortIndicator(0, Qt.AscendingOrder) |
167 header.setSortIndicator(0, Qt.AscendingOrder) |
167 header.setSortIndicatorShown(True) |
168 header.setSortIndicatorShown(True) |
168 if qVersion() >= "5.0.0": |
169 if qVersionTuple() >= (5, 0, 0): |
169 header.setSectionsClickable(True) |
170 header.setSectionsClickable(True) |
170 else: |
171 else: |
171 header.setClickable(True) |
172 header.setClickable(True) |
172 |
173 |
173 self.setSortingEnabled(True) |
174 self.setSortingEnabled(True) |