특정 시그널에 연결 되어 있는지를 확인
def isSignalConnected(_obj, signal_name):
def isSignalConnected(_obj, signal_name):
metaObj = _obj.metaObject()
for i in range(metaObj.methodCount()):
meta_method = metaObj.method(i)
if meta_method.methodType() == QMetaMethod.Signal:
if meta_method.name().data().decode('utf8') == signal_name:
return True
return False
댓글 없음:
댓글 쓰기