Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
6.2.2, 6.9.0
-
None
Description
I add zoom support to Qt example Multimedia/camera.
I simply:
- Add a ZoomedVideoWidget class to the project
- Use it to promote ui's viewfinder
- Zoom x3 at startup
Debug builds just work fine
Release build with 6.2.2 crashs in Qt6Multimedia.dll!QVideoFrame::paint()
So I tested a most recent version, 6.9.0: it does not crash, but view remains all blank, the video is not visible at all (while in Debug, it still works fine).
Skipping zoom computation on first paint as below fixes Release build to work for the two versions:
void ZoomedVideoWidget::paintEvent(QPaintEvent* paint) { // not zooming on first paint fixes problem for all tested Qt versions static bool painted = false; baseClass::paintEvent(paint); if ( painted ) { fitInView(m_pVideoWidget,Qt::KeepAspectRatio); transform(); scale(zoom_percentage,zoom_percentage); } else { painted = true; } }
There must be something wrong in the Qt code that may be fixed.