QCamera with QWidgets possible?
-
Hi
Does QCamera works with QWidget apps? This bug report suggests that Qt Widgets and Qt Multimedia is not supported.
Camera example (qtwidgets) from examples has black viewFinder, QML camera example works.Best Regards
Marek -
Hi,
Are you targeting Android ?
-
Android and iOS and It would be very good if it runs on Windows Mobile.
Camera is for Qr Code recognition, I'm using QZXing projecct.
Today I have tested QZXingLive example with QML camera and merged this with declarative camera example, using
view = new QQuickWidget(ui->scanPage); ui->scanPageLayout->addWidget(view); view->setSource(QUrl("qrc:/declarative-camera.qml")); view->show();
My app is based on QWidgets, so I added QQuickWidget to one of QStackedWidget pages it looks like it works, but I haven't done anything in QML yet, so it's new for me, I will probably have more questions tomorrow.
Is this generally good approach? I would like to avoid rewriting the whole app to QML
Best Regards
Marek -
Yes, It's one way to implement it.
It's likely a problem between the QVideoFrame format selected for the camera and the one the QCameraViewfinder supports.
-
"It's likely a problem between the QVideoFrame format selected for the camera and the one the QCameraViewfinder supports."
that is true if I use QCamera with QWidgets
will my QML approach works on iOS and possibly Windows Mobile?
-
I think so for iOS, I don't know for Windows Mobile. Never developed for that platform.
-
Yes, I never did Windows Mobile either ;)
Best Regards
Marek