How can I import RoundProgressBar and SpiralProgressBar to a Qt widget in my main.py file from another python file? PySide6/Python3.12.1

38 views Asked by At

I have an issue with PysideExtn in PySide6 an Python 3.12.1 . when I make a RoundProgressBar or SpiralProgressBar in Qt designer and run the main.py file, I recived a lot of errors like: 1- <<

self.setMinimumSize(QSize(self.lineWidth*6 + self.pathWidth*6, self.lineWidth*6 + self.pathWidth*6))
TypeError: 'PySide6.QtWidgets.QWidget.setMinimumSize' called with wrong argument types:
  PySide6.QtWidgets.QWidget.setMinimumSize(QSize)
Supported signatures:
  PySide6.QtWidgets.QWidget.setMinimumSize(PySide6.QtCore.QSize)
  PySide6.QtWidgets.QWidget.setMinimumSize(int, int) 

2- <<

TypeError: arguments did not match any overloaded call:
  QPainter(): too many arguments
  QPainter(a0: Optional[QPaintDevice]): argument 1 has unexpected type 'spiralProgressBar' 

At first, I thought the problem was in my software, so I tried to check that. when I got the RoundProgressBar demo code from github.com and copy in empty Python file, I saw the program run very well, without any error, and showed the RoundProgressBar window to me. So, At this time, I need a way to solve this problem.

I want to add and show RoundProgressBar or SpiralProgressBar in my QtWidget. when I tried to do that in Qt Designer, that's failed. I want to know, is it possible to write the RoundProgressBar or SpiralProgressBar code in another Python file and import that to QtWidget in the main.py file without using Qt Designer? Is there a better way to solve this problem? thanks.

0

There are 0 answers