I subclassed a widget (MyButton) and gave it my stylesheet,animation,etc.
in another class (MyForm) i want to use that button but without layout .
class MyButton(QPushButton):
def __init__(self):
super(MyButton, self).__init__()
.
.
class MyForm(QDialog):
def __init__(self):
super(MyForm, self).__init__()
self.btn=MyButton(self)
self.btn.move(220, 30)
If i try to say self.btn=MyButton(self)
and then self.btn.move()
this error comes up:
self.btn=MyButton(self)
TypeError: __init__() takes 1 positional argument but 2 were given
what should i do?