DataViews/CodeMetricsDialog.py

changeset 2094
88620e11c67c
parent 1640
1699d46026cd
child 2223
054c285dab38
equal deleted inserted replaced
2089:d23ab571d2b9 2094:88620e11c67c
8 """ 8 """
9 9
10 import os 10 import os
11 import fnmatch 11 import fnmatch
12 12
13 from PyQt4.QtCore import pyqtSlot, Qt, QLocale 13 from PyQt4.QtCore import pyqtSlot, Qt, QLocale, qVersion
14 from PyQt4.QtGui import QDialog, QDialogButtonBox, QMenu, QHeaderView, QTreeWidgetItem, \ 14 from PyQt4.QtGui import QDialog, QDialogButtonBox, QMenu, QHeaderView, QTreeWidgetItem, \
15 QApplication 15 QApplication
16 16
17 from .Ui_CodeMetricsDialog import Ui_CodeMetricsDialog 17 from .Ui_CodeMetricsDialog import Ui_CodeMetricsDialog
18 from . import CodeMetrics 18 from . import CodeMetrics
223 self.cancelled = True 223 self.cancelled = True
224 self.buttonBox.button(QDialogButtonBox.Close).setEnabled(True) 224 self.buttonBox.button(QDialogButtonBox.Close).setEnabled(True)
225 self.buttonBox.button(QDialogButtonBox.Cancel).setEnabled(False) 225 self.buttonBox.button(QDialogButtonBox.Cancel).setEnabled(False)
226 self.buttonBox.button(QDialogButtonBox.Close).setDefault(True) 226 self.buttonBox.button(QDialogButtonBox.Close).setDefault(True)
227 227
228 self.resultList.header().setResizeMode(QHeaderView.Interactive) 228 if qVersion() >= "5.0.0":
229 self.summaryList.header().setResizeMode(QHeaderView.Interactive) 229 self.resultList.header().setSectionResizeMode(QHeaderView.Interactive)
230 self.summaryList.header().setSectionResizeMode(QHeaderView.Interactive)
231 else:
232 self.resultList.header().setResizeMode(QHeaderView.Interactive)
233 self.summaryList.header().setResizeMode(QHeaderView.Interactive)
230 234
231 def on_buttonBox_clicked(self, button): 235 def on_buttonBox_clicked(self, button):
232 """ 236 """
233 Private slot called by a button of the button box clicked. 237 Private slot called by a button of the button box clicked.
234 238

eric ide

mercurial