diff --git a/Demo/IsSignalConnected.py b/Demo/IsSignalConnected.py index 4dbb19e..c651e61 100644 --- a/Demo/IsSignalConnected.py +++ b/Demo/IsSignalConnected.py @@ -34,11 +34,11 @@ class Window(QWidget): def doTest(self): self.retView.append(""" - # button1 clicked 是否连接: %s - # button2 clicked 是否连接: %s + # button1 clicked 是否连接: %s, %s + # button2 clicked 是否连接: %s, %s """ % ( - self.isSignalConnected(self.button1, 'clicked()'), - self.isSignalConnected(self.button2, 'clicked()') + self.isSignalConnected(self.button1, 'clicked()'), self.button1.receivers(self.button1.clicked) > 0, + self.isSignalConnected(self.button2, 'clicked()'), self.button2.receivers(self.button2.clicked) > 0, )) def isSignalConnected(self, obj, name): diff --git a/Demo/README.md b/Demo/README.md index 9fc9353..31e582c 100644 --- a/Demo/README.md +++ b/Demo/README.md @@ -204,7 +204,8 @@ PyQt 结合 Opencv 进行人脸检测; ## 20、判断信号是否连接 [运行 IsSignalConnected.py](IsSignalConnected.py) -通过 `isSignalConnected` 判断是否连接 +1. 通过 `isSignalConnected` 判断是否连接 +2. 通过对象的 `receivers` 获取连接的数量来判断 ![IsSignalConnected](ScreenShot/IsSignalConnected.png) diff --git a/Demo/ScreenShot/IsSignalConnected.png b/Demo/ScreenShot/IsSignalConnected.png index e87aaef..829976f 100644 Binary files a/Demo/ScreenShot/IsSignalConnected.png and b/Demo/ScreenShot/IsSignalConnected.png differ diff --git a/Test/C++中修改PyQt对象/src.jpg b/Test/C++中修改PyQt对象/src.jpg deleted file mode 100644 index 2b113b0..0000000 Binary files a/Test/C++中修改PyQt对象/src.jpg and /dev/null differ