Debugger/VariablesViewer.py

changeset 2094
88620e11c67c
parent 1509
c0b5e693b0eb
child 2302
f29e9405c851
equal deleted inserted replaced
2089:d23ab571d2b9 2094:88620e11c67c
5 5
6 """ 6 """
7 Module implementing the variables viewer widget. 7 Module implementing the variables viewer widget.
8 """ 8 """
9 9
10 from PyQt4.QtCore import Qt, QRegExp 10 from PyQt4.QtCore import Qt, QRegExp, qVersion
11 from PyQt4.QtGui import QTreeWidget, QTreeWidgetItem, QApplication, QAbstractItemView, \ 11 from PyQt4.QtGui import QTreeWidget, QTreeWidgetItem, QApplication, QAbstractItemView, \
12 QMenu 12 QMenu
13 13
14 from E5Gui.E5Application import e5App 14 from E5Gui.E5Application import e5App
15 15
305 )) 305 ))
306 306
307 header = self.header() 307 header = self.header()
308 header.setSortIndicator(0, Qt.AscendingOrder) 308 header.setSortIndicator(0, Qt.AscendingOrder)
309 header.setSortIndicatorShown(True) 309 header.setSortIndicatorShown(True)
310 header.setClickable(True) 310 if qVersion() >= "5.0.0":
311 header.setSectionsClickable(True)
312 else:
313 header.setClickable(True)
311 header.resizeSection(0, 120) # variable column 314 header.resizeSection(0, 120) # variable column
312 header.resizeSection(1, 150) # value column 315 header.resizeSection(1, 150) # value column
313 316
314 self.__createPopupMenus() 317 self.__createPopupMenus()
315 self.setContextMenuPolicy(Qt.CustomContextMenu) 318 self.setContextMenuPolicy(Qt.CustomContextMenu)

eric ide

mercurial