fix: use Qt6 enums properly
New Anki version(23.10) dropped compatibility for Qt5: https://forums.ankiweb.net/t/porting-tips-for-anki-23-10/35916#enumerations-6
This commit is contained in:
parent
23f9c0cb68
commit
766d246f46
1
.gitignore
vendored
1
.gitignore
vendored
@ -117,6 +117,7 @@ venv/
|
|||||||
ENV/
|
ENV/
|
||||||
env.bak/
|
env.bak/
|
||||||
venv.bak/
|
venv.bak/
|
||||||
|
.idea
|
||||||
|
|
||||||
# Spyder project settings
|
# Spyder project settings
|
||||||
.spyderproject
|
.spyderproject
|
||||||
|
@ -56,22 +56,22 @@ class EditorPreview(object):
|
|||||||
location = config["location"]
|
location = config["location"]
|
||||||
split = QSplitter()
|
split = QSplitter()
|
||||||
if location == "above":
|
if location == "above":
|
||||||
split.setOrientation(Qt.Vertical)
|
split.setOrientation(Qt.Orientation.Vertical)
|
||||||
split.addWidget(editor.editor_preview)
|
split.addWidget(editor.editor_preview)
|
||||||
split.addWidget(editor.web)
|
split.addWidget(editor.web)
|
||||||
sizes = [editorR, mainR]
|
sizes = [editorR, mainR]
|
||||||
elif location == "below":
|
elif location == "below":
|
||||||
split.setOrientation(Qt.Vertical)
|
split.setOrientation(Qt.Orientation.Vertical)
|
||||||
split.addWidget(editor.web)
|
split.addWidget(editor.web)
|
||||||
split.addWidget(editor.editor_preview)
|
split.addWidget(editor.editor_preview)
|
||||||
sizes = [mainR, editorR]
|
sizes = [mainR, editorR]
|
||||||
elif location == "left":
|
elif location == "left":
|
||||||
split.setOrientation(Qt.Horizontal)
|
split.setOrientation(Qt.Orientation.Horizontal)
|
||||||
split.addWidget(editor.editor_preview)
|
split.addWidget(editor.editor_preview)
|
||||||
split.addWidget(editor.web)
|
split.addWidget(editor.web)
|
||||||
sizes = [editorR, mainR]
|
sizes = [editorR, mainR]
|
||||||
elif location == "right":
|
elif location == "right":
|
||||||
split.setOrientation(Qt.Horizontal)
|
split.setOrientation(Qt.Orientation.Horizontal)
|
||||||
split.addWidget(editor.web)
|
split.addWidget(editor.web)
|
||||||
split.addWidget(editor.editor_preview)
|
split.addWidget(editor.editor_preview)
|
||||||
sizes = [mainR, editorR]
|
sizes = [mainR, editorR]
|
||||||
|
Loading…
Reference in New Issue
Block a user