Project/LexerAssociationDialog.py

changeset 5736
000ea446ff4b
parent 5616
adcffadf4962
child 6048
82ad8ec9548c
diff -r f606dbe20be6 -r 000ea446ff4b Project/LexerAssociationDialog.py
--- a/Project/LexerAssociationDialog.py	Sat May 13 13:46:05 2017 +0200
+++ b/Project/LexerAssociationDialog.py	Sat May 13 16:32:54 2017 +0200
@@ -11,11 +11,13 @@
 
 import os
 
-from PyQt5.QtCore import Qt, pyqtSlot, qVersion
+from PyQt5.QtCore import Qt, pyqtSlot
 from PyQt5.QtWidgets import QHeaderView, QTreeWidgetItem, QDialog
 
 from .Ui_LexerAssociationDialog import Ui_LexerAssociationDialog
 
+from Globals import qVersionTuple
+
 
 class LexerAssociationDialog(QDialog, Ui_LexerAssociationDialog):
     """
@@ -34,7 +36,7 @@
         self.editorLexerList.headerItem().setText(
             self.editorLexerList.columnCount(), "")
         header = self.editorLexerList.header()
-        if qVersion() >= "5.0.0":
+        if qVersionTuple() >= (5, 0, 0):
             header.setSectionResizeMode(QHeaderView.ResizeToContents)
         else:
             header.setResizeMode(QHeaderView.ResizeToContents)

eric ide

mercurial