Home > Back-end >  QCamera couldn't open the camera, error message "org. Qt - project. Qt. Camera"
QCamera couldn't open the camera, error message "org. Qt - project. Qt. Camera"

Time:04-14

System: win10.
Environment: Qt5.6.

The code is as follows:
 
Camera=new QCamera ();
Viewfinder=new QCameraViewfinder (this);
The UI - & gt; Cameraview - & gt; AddWidget (viewfinder);
ImageCap=new QCameraImageCapture (camera);

Camera - & gt; SetCaptureMode (QCamera: : CaptureViewfinder);
Camera - & gt; SetViewfinder (viewfinder);
Camera - & gt; Stop ();
Camera - & gt; Start ().
Viewfinder - & gt; Show ();


Run the prompt error message is as follows:
DefaultServiceProvider: : requestService () : no service found the for - "org. Qt - project. Qt. Camera",
The error is in the camera=new QCamera (); ,,

CodePudding user response:

Baidu search relevant keywords,

CodePudding user response:

Search on the net, and this problem have no concrete answers, https://forum.qt.io/topic/52232/pi-camera-error-no-service-found-for-org-qt-project-qt-camera/, most recommend the use of opencv, it's really difficult to opencv environment configuration

CodePudding user response:

The Qt/Qt5.6.0 msvc2013 mediaservice directory under the/plugins/copy to the bin directory of the project
  • Related