From 765a35119f258f352718a556fbea4af708236900 Mon Sep 17 00:00:00 2001 From: tassaron Date: Wed, 13 Apr 2022 16:04:32 -0400 Subject: cast floats to ints when calling resize(), setX(), and setY() (argument types changed in newer version) --- src/gui/preview_win.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/gui') diff --git a/src/gui/preview_win.py b/src/gui/preview_win.py index 3db420c..27e0a59 100644 --- a/src/gui/preview_win.py +++ b/src/gui/preview_win.py @@ -25,8 +25,8 @@ class PreviewWindow(QtWidgets.QLabel): transformMode=QtCore.Qt.SmoothTransformation) # start painting the label from left upper corner - point.setX((size.width() - scaledPix.width())/2) - point.setY((size.height() - scaledPix.height())/2) + point.setX(int((size.width() - scaledPix.width())/2)) + point.setY(int((size.height() - scaledPix.height())/2)) painter.drawPixmap(point, scaledPix) def changePixmap(self, img): -- cgit v1.2.3