Skip to content

Commit bb8acc4

Browse files
committed
Improve compatibility with unofficial releases before Cura 5.0
Some versions of Cura tried to use the system-installed PyQt6 when they should still be using PyQt5 (which can be installed in parallel)
1 parent 48bad5e commit bb8acc4

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

SidebarGUIPlugin.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,13 @@
88
from UM.Logger import Logger
99

1010
try:
11+
from cura.ApplicationMetadata import CuraSDKVersion
12+
except ImportError: # Cura <= 3.6
13+
CuraSDKVersion = "6.0.0"
14+
if CuraSDKVersion >= "8.0.0":
1115
from PyQt6.QtCore import QUrl
1216
from PyQt6.QtQml import qmlRegisterSingletonType
13-
except ImportError:
17+
else:
1418
from PyQt5.QtCore import QUrl
1519
from PyQt5.QtQml import qmlRegisterSingletonType
1620

SidebarGUIProxy.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,12 @@
66
from UM.FlameProfiler import pyqtSlot
77

88
try:
9+
from cura.ApplicationMetadata import CuraSDKVersion
10+
except ImportError: # Cura <= 3.6
11+
CuraSDKVersion = "6.0.0"
12+
if CuraSDKVersion >= "8.0.0":
913
from PyQt6.QtCore import QObject, QRectF
10-
except ImportError:
14+
else:
1115
from PyQt5.QtCore import QObject, QRectF
1216

1317
try:

0 commit comments

Comments
 (0)