Próbuję dodać funkcję w klasie PyQt, ale zawsze zwraca mi błąd.Utwórz dynamiczny przycisk w PyQt
# Error: TypeError: connect() slot argument should be a callable or a signal, not 'NoneType' #
def commander (self, arg):
exec arg
def aButton (self, layout, **kwargs):
name = kwargs.pop("name","Button")
command = kwargs.pop("command", "")
button = QtGui.QPushButton(name)
button.clicked.connect(self.commander(command))
layout.addWidget(button)
return button
Może ktoś tutaj może mi pomóc rozwiązać to: ') Thx!
good 'call' hehe .. –
Dzięki! to działa ! – MObject
w porządku! Jestem tu nowy;) thx ponownie :) – MObject