eric6/Project/LexerAssociationDialog.py

branch
without_py2_and_pyqt4
changeset 7198
684261ef2165
parent 6942
2602857055c5
child 7229
53054eb5b15a
equal deleted inserted replaced
7197:331569d44b19 7198:684261ef2165
13 13
14 from PyQt5.QtCore import Qt, pyqtSlot 14 from PyQt5.QtCore import Qt, pyqtSlot
15 from PyQt5.QtWidgets import QHeaderView, QTreeWidgetItem, QDialog 15 from PyQt5.QtWidgets import QHeaderView, QTreeWidgetItem, QDialog
16 16
17 from .Ui_LexerAssociationDialog import Ui_LexerAssociationDialog 17 from .Ui_LexerAssociationDialog import Ui_LexerAssociationDialog
18
19 from Globals import qVersionTuple
20 18
21 19
22 class LexerAssociationDialog(QDialog, Ui_LexerAssociationDialog): 20 class LexerAssociationDialog(QDialog, Ui_LexerAssociationDialog):
23 """ 21 """
24 Class implementing a dialog to enter lexer associations for the project. 22 Class implementing a dialog to enter lexer associations for the project.
34 self.setupUi(self) 32 self.setupUi(self)
35 33
36 self.editorLexerList.headerItem().setText( 34 self.editorLexerList.headerItem().setText(
37 self.editorLexerList.columnCount(), "") 35 self.editorLexerList.columnCount(), "")
38 header = self.editorLexerList.header() 36 header = self.editorLexerList.header()
39 if qVersionTuple() >= (5, 0, 0): 37 header.setSectionResizeMode(QHeaderView.ResizeToContents)
40 header.setSectionResizeMode(QHeaderView.ResizeToContents)
41 else:
42 header.setResizeMode(QHeaderView.ResizeToContents)
43 header.setSortIndicator(0, Qt.AscendingOrder) 38 header.setSortIndicator(0, Qt.AscendingOrder)
44 39
45 try: 40 try:
46 self.extsep = os.extsep 41 self.extsep = os.extsep
47 except AttributeError: 42 except AttributeError:

eric ide

mercurial