title: Attribute error: 'bool' object has no attribute 'signal'
body: <p>I am working on a PyQT application and I am stuck trying to implement a CV class into its framework. Here is the class with the issue, and where the error originates.</p>
  
  <pre><code>class ShowVid(QObject):
      signal = pyqtSignal(QImage)        
  
      def __init__(self):
          super().__init__()
  
      @pyqtSlot()
      def startVideo(self):
          camera_port = 0
          camera = cv2.VideoCapture(camera_port)          
          run_video = True
          while run_video:
              ret, image = camera.read()
              color_swapped_image = cv2.cvtColor(image, cv2.COLOR_BGR2RGB)
  
              height, width, _ = color_swapped_image.shape
              qt_image = QImage(color_swapped_image.data,
                                width,
                                height,
                                color_swapped_image.strides[0],
                                QImage.Format_RGB888)
  
              self.signal.emit(qt_image)
  </code></pre>
  
  <p>I receive the error: </p>
  
  <pre><code>self.signal.emit(qt_image)
  AttributeError: 'bool' object has no attribute 'signal'
  Abort trap: 6
  </code></pre>
  
  <p>Update with code from Main and VidViewer class. The VidViewer class paints the image from the frame captured with the camera. Frames are refreshed by the setImage slot. The main class structures the widgets with the layout and runs the application.</p>
  
  <pre><code>class VidViewer(QWidget):
      def __init__(self):
          super().__init__()
          self.layout = QGridLayout()
          self.image = QImage()        
          self.initUI()
  
      def paintEvent(self, _):
          print("paint image")
          painter = QPainter(self)
          painter.drawImage(0, 0, self.image)
          self.paintImage = QImage()
  
      def initUI(self):
          print("INIT UI")  
          #image = self.image
          self.push_button = QPushButton("Start")
  
          self.push_button.clicked.connect(ShowVid.startVideo)
  
          self.layout.addWidget(self.push_button, 0, 0,1,1) 
  
          self.setLayout(self.layout) 
          self.setWindowTitle('Test')
          self.show()
  
      @pyqtSlot(QImage)
      def setImage(self, image):
          self.image = image
          self.paintEvent()
  
  
  class Main(QMainWindow):
      def __init__(self):
          super().__init__()
          self.central_widget = QStackedWidget()
          self.setCentralWidget(self.central_widget)
  
          self.viewer = VidViewer()
          self.vid = ShowVid()
  
          self.central_widget.addWidget(self.viewer)       
          self.central_widget.setCurrentWidget(self.viewer) 
  
          self.vid.signal.connect(self.viewer.setImage)  
  
          self.setGeometry(10,10,1280,720)        
          self.setFixedSize(1280,720) 
  
  app = QApplication(sys.argv)
  run = Main()   
  run.show()
  
  sys.exit(app.exec_())
  </code></pre>