2014-05-21 4 views
0

파일 1로 신호를 보내기 내가 여기에 인수없이 신호()를 사용했다부울 인수

class B(QMainWindow): 
. 
. 
self.model.status.connect(self.update) 
@Slot() 
def update(self): 
    # here i have to process data based on the boolean argument passed through signal 

을하지만, 내가 어떻게 여기에 인수를 추가 할 수 있습니까?

+0

그것이 pyside 또는 PyQt는 경우 쉽게? QT가 당신이 말하는 것과 다른 프로젝트이기 때문에 [tag : qt] 위키를 읽으십시오. – lpapp

+0

@LaszloPapp의 PySide – Patrick

답변

2

이것은 read the documentation

from PySide import QtCore 


class A(QtCore.QObject): 
    status = QtCore.Signal(bool) 

    def func1(self, *args): 
     self.status.emit(*args) 

# later... 


@QtCore.Slot(bool) 
def update(self, bool_args): 
    pass # insert what you need to do here.