Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
QCamera (on Windows 7) re-sizing does not work, window grows only bigger not smaller.
cnc-bert last edited by
I just want a simple Camera webcam vieuwer in my App.
The code below works, but the window can only be size bigger, smaller does not work.
Also KeepaspectRation isnt working,etither
- How can I solve this?
- I want to draw a simple cross with 2 lines over the camera image view, how can I do that?
- How can I show the image in e.g. a QLabel?
This is my code, standard Qt creator project:
CameraWindow::CameraWindow(QWidget *parent) :
//QAbstractVideoSurface camera = new QCamera; viewFinder = new QCameraViewfinder; viewFinder->setAspectRatioMode(Qt::KeepAspectRatioByExpanding); viewFinder->show(); camera->setViewfinder(viewFinder); camera->setCaptureMode(QCamera::CaptureStillImage); camera->start(); this->setCentralWidget(viewFinder);