Handle QSci enums in pyqt5 to qt6

This commit is contained in:
Nyall Dawson 2024-01-17 10:54:05 +10:00
parent 77f289d32e
commit 23df946386
2 changed files with 4 additions and 4 deletions

View File

@ -148,7 +148,7 @@ class ShellOutputScintilla(QgsCodeEditorPython):
self.setMinimumHeight(120)
self.setWrapMode(QsciScintilla.WrapCharacter)
self.setWrapMode(QsciScintilla.WrapMode.WrapCharacter)
self.SendScintilla(QsciScintilla.SCI_SETHSCROLLBAR, 0)
self.runScut = QShortcut(QKeySequence(Qt.Modifier.CTRL + Qt.Key.Key_E), self)
@ -192,7 +192,7 @@ class ShellOutputScintilla(QgsCodeEditorPython):
def initializeLexer(self):
super().initializeLexer()
self.setFoldingVisible(False)
self.setEdgeMode(QsciScintilla.EdgeNone)
self.setEdgeMode(QsciScintilla.EdgeMode.EdgeNone)
def refreshSettingsOutput(self):
# Set Python lexer

View File

@ -51,7 +51,7 @@ from tokenize_rt import Offset, src_to_tokens, tokens_to_src, reversed_enumerate
from typing import Sequence
from PyQt6 import QtCore, QtGui, QtWidgets, QtTest, QtSql, QtSvg, QtXml, QtNetwork, QtPrintSupport
from PyQt6 import QtCore, QtGui, QtWidgets, QtTest, QtSql, QtSvg, QtXml, QtNetwork, QtPrintSupport, Qsci
# qmetatype which have been renamed
qmetatype_mapping = {
@ -185,7 +185,7 @@ def main(argv: Sequence[str] | None = None) -> int:
args = parser.parse_args(argv)
# get all scope for all qt enum
for module in QtCore, QtGui, QtWidgets, QtTest, QtSql, QtSvg, QtXml, QtNetwork, QtPrintSupport:
for module in (QtCore, QtGui, QtWidgets, QtTest, QtSql, QtSvg, QtXml, QtNetwork, QtPrintSupport, Qsci):
for key, value in module.__dict__.items():
get_class_enums(value)