title: PyQt showing video stream from opencv
body: <p>Try to link PyQt and Opencv video feed, can't understand how to apply while loop for continuously streaming video.  It just take a still picture.Please can anyone help to solve the problem.</p>
  
  <ul>
  <li><p>PtQt=5</p></li>
  <li><p>Python=3.6.1</p></li>
  </ul>
  
  <hr>
  
  <pre><code>class App(QWidget):
      def __init__(self):
          super().__init__()
          self.title = 'PyQt5 Video'
          self.left = 100
          self.top = 100
          self.width = 640
          self.height = 480
          self.initUI()
  
  
      def initUI(self):
          self.setWindowTitle(self.title)
          self.setGeometry(self.left, self.top, self.width, self.height)
          self.resize(1800, 1200)
          #create a label
          label = QLabel(self)
          cap = cv2.VideoCapture(0)
          ret, frame = cap.read()
          rgbImage = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB)
          convertToQtFormat = QtGui.QImage(rgbImage.data, rgbImage.shape[1], rgbImage.shape[0],
                                           QtGui.QImage.Format_RGB888)
          convertToQtFormat = QtGui.QPixmap.fromImage(convertToQtFormat)
          pixmap = QPixmap(convertToQtFormat)
          resizeImage = pixmap.scaled(640, 480, QtCore.Qt.KeepAspectRatio)
          QApplication.processEvents()
          label.setPixmap(resizeImage)
          self.show()
  
  if __name__ == '__main__':
      app = QApplication(sys.argv)
      ex = App()
      sys.exit(app.exec_())
  </code></pre>