From 9235ca8b45231fcca44531aacb42402590fa9f84 Mon Sep 17 00:00:00 2001 From: falkTX Date: Wed, 21 Aug 2024 00:18:41 +0200 Subject: [PATCH] Fix the backporting Signed-off-by: falkTX --- source/frontend/patchcanvas/canvasport.py | 2 +- source/frontend/widgets/pixmapdial.py | 1 + source/frontend/widgets/scalabledial.py | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/source/frontend/patchcanvas/canvasport.py b/source/frontend/patchcanvas/canvasport.py index 1e6a3af724..b91af4aea4 100644 --- a/source/frontend/patchcanvas/canvasport.py +++ b/source/frontend/patchcanvas/canvasport.py @@ -21,7 +21,7 @@ from math import floor -from PyQt5.QtCore import qCritical, Qt, QLineF, QPointF, QRectF, QTimer +from PyQt5.QtCore import qCritical, QT_VERSION, Qt, QLineF, QPointF, QRectF, QTimer from PyQt5.QtGui import QCursor, QFont, QFontMetrics, QPainter, QPainterPath, QPen, QPolygonF from PyQt5.QtWidgets import QGraphicsItem, QMenu diff --git a/source/frontend/widgets/pixmapdial.py b/source/frontend/widgets/pixmapdial.py index a3ae9a12d0..ad6b87f50c 100644 --- a/source/frontend/widgets/pixmapdial.py +++ b/source/frontend/widgets/pixmapdial.py @@ -26,6 +26,7 @@ from PyQt5.QtWidgets import QDial from .commondial import CommonDial +from carla_shared import fontMetricsHorizontalAdvance # --------------------------------------------------------------------------------------------------------------------- # Widget Class diff --git a/source/frontend/widgets/scalabledial.py b/source/frontend/widgets/scalabledial.py index 966cef8d42..b7b2cb1499 100644 --- a/source/frontend/widgets/scalabledial.py +++ b/source/frontend/widgets/scalabledial.py @@ -26,6 +26,7 @@ from PyQt5.QtSvg import QSvgWidget from .commondial import CommonDial +from carla_shared import fontMetricsHorizontalAdvance # --------------------------------------------------------------------------------------------------------------------- # Widget Class