$ python carousel_example.py
QSocketNotifier: Can only be used with threads started with QThread
qt.qpa.qgnomeplatform.theme: The desktop style for QtQuick Controls 2 applications is not available on the system (qqc2-desktop-style). The application may look broken.
Traceback (most recent call last):
File "/home/alberto/.local/lib/python3.11/site-packages/dayu_widgets/switch.py", line 45, in minimumSizeHint
return QtCore.QSize(height, height / 2)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: arguments did not match any overloaded call:
QSize(): too many arguments
QSize(w: int, h: int): argument 1 has unexpected type 'float'
QSize(a0: QSize): argument 1 has unexpected type 'float'
$ qmake-qt5 --version
QMake version 3.1
Using Qt version 5.15.11 in /usr/lib64
$ qmake-qt4 --version
QMake version 2.01a
Using Qt version 4.8.7 in /usr/lib64
diff --git c/dayu_widgets/carousel.py i/dayu_widgets/carousel.py
index a5c55b2..ee4dc41 100644
--- c/dayu_widgets/carousel.py
+++ i/dayu_widgets/carousel.py
@@ -92,7 +92,7 @@ class MCarousel(QtWidgets.QGraphicsView):
hud_widget = QtWidgets.QWidget(self)
hud_widget.setLayout(self.navigate_lay)
hud_widget.setStyleSheet("background:transparent")
- hud_widget.move(width / 2 - total_width / 2, height - 30)
+ hud_widget.move(int(width / 2 - total_width / 2), height - 30)
self.setFixedWidth(width + 2)
self.setFixedHeight(height + 2)
diff --git c/dayu_widgets/switch.py i/dayu_widgets/switch.py
index b56cf8c..041fb15 100644
--- c/dayu_widgets/switch.py
+++ i/dayu_widgets/switch.py
@@ -42,7 +42,7 @@ class MSwitch(QtWidgets.QRadioButton):
:return:
"""
height = self._dayu_size * 1.2
- return QtCore.QSize(height, height / 2)
+ return QtCore.QSize(int(height), int(height / 2))
def get_dayu_size(self):
"""