--- a/Preferences/ConfigurationPages/EditorHighlightersPage.py Wed Oct 03 13:20:57 2012 +0200 +++ b/Preferences/ConfigurationPages/EditorHighlightersPage.py Wed Oct 03 15:36:41 2012 +0200 @@ -11,7 +11,7 @@ from pygments.lexers import get_all_lexers -from PyQt4.QtCore import Qt, pyqtSlot +from PyQt4.QtCore import Qt, pyqtSlot, qVersion from PyQt4.QtGui import QHeaderView, QTreeWidgetItem from .ConfigurationPageBase import ConfigurationPageBase @@ -36,7 +36,10 @@ self.editorLexerList.headerItem().setText(self.editorLexerList.columnCount(), "") header = self.editorLexerList.header() - header.setResizeMode(QHeaderView.ResizeToContents) + if qVersion() >= "5.0.0": + header.setSectionResizeMode(QHeaderView.ResizeToContents) + else: + header.setResizeMode(QHeaderView.ResizeToContents) header.setSortIndicator(0, Qt.AscendingOrder) try: