QCamera (on Windows 7) re-sizing does not work, window grows only bigger not smaller.
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);