title: Embedding an OpenCV window into a Qt GUI
body: <p>OpenCV recently <a href="http://opencv.willowgarage.com/documentation/c/highgui_qt_new_functions.html" rel="nofollow noreferrer">upgraded its display window</a>, when it is used in Qt.
  It looks very good, however I did not find any possibility for it to be embedded into an existing Qt GUI window. The only possibility seems to be the creation of a <code>cvNamedWindow</code> or <code>cv::namedWindow</code>, but it creates a free-floating independent window.</p>
  
  <p>Is there any possibility to create that OpenCV window <strong>inside</strong> an existing GUI? All I could find on the OpenCV forums is <a href="http://opencv-users.1802565.n2.nabble.com/Need-to-include-a-cvNamedWindow-into-anothet-window-td7439443.html" rel="nofollow noreferrer">an unanswered question</a>, somewhat similar to my own.</p>
  
  <p>There is a straight-forward <a href="https://stackoverflow.com/questions/8864400/how-to-push-an-opencv-image-viewing-window-into-a-qt-gui-with-visual-studio?rq=1">possibility to show an OpenCV image in Qt</a>, but it has two major problems:</p>
  
  <ol>
  <li>it involves copying the image pixel by pixel, and it's quite slow. It has function calls for every pixel! (in my test application, if I create a video out of the images, and display it in a <code>cvNamedWindow</code>, it runs very smoothly even for multiple videos the same time, but if I go through the <code>IplImage</code> --> <code>QImage</code> --> <code>QPixmap</code> --> <code>QLabel</code> route, it has severe lag even for one single video)</li>
  <li>I can't use those nice new controls of the <code>cvNamedWindow</code> with it.</li>
  </ol>