title: QT6 How to convert QVideoFrame to cv::Mat?
body: <p>Does anyone know how to convert <code>QVideoFrame</code> to <code>OpenCV cv::Mat</code> in QT6?
  I have event where video frame arrived from video camera.</p>
  <pre><code>void videoFrameChanged(const QVideoFrame &amp;frame)// frame from QCamera
  {
    QImage qImg=frame.toImage();//&lt;&lt;-- slow
     cv::Mat m=Qimage2Mat_shared(qImg);
  
    ...
  }
  </code></pre>
  <p>I know how to convert QImage to cv::Mat, but here used very slow function: frame.toImage().
  How to convert directly QVideoFrame to cv::Mat ?</p>