kody-black / SecKill

一个超级好用的抢单软件(支持淘宝/京东)
82 stars 24 forks source link

type error #3

Open yueru-mylove opened 1 year ago

yueru-mylove commented 1 year ago

File "D:\python_projects\SecKill-main\main.py", line 296, in myDlg = MainDialog() File "D:\python_projects\SecKill-main\main.py", line 31, in init self.move((self.screen.width() - size.width() - 80), (self.screen.height() - size.height()) / 2) TypeError: arguments did not match any overloaded call: move(self, QPoint): argument 1 has unexpected type 'int' move(self, int, int): argument 2 has unexpected type 'float'

python 3.10.0

kody-black commented 1 year ago

If there is only a problem with the 'move' function, then you can delete this function directly, and it will not have much impact. But if there are other problems, it may be a problem with your python version, you can try it with python3.7

AsenYou commented 5 months ago

File "D:\python_projects\SecKill-main\main.py", line 296, in myDlg = MainDialog() File "D:\python_projects\SecKill-main\main.py", line 31, in init self.move((self.screen.width() - size.width() - 80), (self.screen.height() - size.height()) / 2) TypeError: arguments did not match any overloaded call: move(self, QPoint): argument 1 has unexpected type 'int' move(self, int, int): argument 2 has unexpected type 'float'

python 3.10.0

You need to make sure that both arguments passed to the move method are integers. This can be fixed by converting the second argument to an integer, which can be done using the int() function.

self.move((self.screen.width() - size.width() - 80), (self.screen.height() - size.height()) / 2) change to self.move((self.screen.width() - size.width() - 80), int((self.screen.height() - size.height()) / 2))