title: Display OpenCV Video with PyQt5
body: <p>I'm trying to create a really simple GUI that displays video captured from webcam. I do know how to show the frames with openCV window:</p>
  
  <pre><code>cap = cv2.VideoCapture(0)
  while True:
      _, frame = cap.read()
      cv2.imshow('Frame', frame)
  </code></pre>
  
  <p>This creates an extra window which shows the frames. My question is: <strong>how do I show those frames in a qt window?</strong> </p>
  
  <p>I started with images first. I created a QLabel and used it as a container to display the image. And it worked. Can I show video frames in a similar way?</p>
  
  <pre><code>pixmap = QtGui.QPixmap(myImagePath)
  self.imageBox.setPixmap(pixmap)
  self.imageBox.show()
  </code></pre>
  
  <p>EDIT: I tried the similar approach with frames, but it crashed. (stuck in while loop? I had to force quit python)</p>
  
  <pre><code>def openCamera(self):
      self.capturing = True
      self.cap = cv2.VideoCapture(0)
  
      while self.capturing:
          _, frame = self.cap.read()
          videoFrame = QtGui.QImage(frame, 200, 200,
                                    QtGui.QImage.Format_RGB888)
          convertFrame = QtGui.QPixmap(videoFrame)
          self.imageBox.setPixmap(convertFrame)
          self.imageBox.show()
  </code></pre>
  
  <p>I use:</p>
  
  <ul>
  <li>python 3.5.2</li>
  <li>OpenCV 3.1.0</li>
  <li>PyQt5</li>
  <li>Windows 10</li>
  </ul>
  
  <p>Thanks in advance!</p>