Want to show detect camera using QCamera
-
Actually, I want to access camera inside oven and but In my case I'm it's showing camera not found...
When I try to run sample code for detecting the camera of my pc and I'm able to do it,
Can anyone tell what approach I need to do for detecting the camera inside ovenThis is my code->>
layout = new QVBoxLayout(this);
QList<QCameraInfo> cameras = QCameraInfo::availableCameras();
if (cameras.isEmpty()) {
qDebug() << "No cameras found.";
return;
}
camera = new QCamera(cameras.first());
viewfinder = new QCameraViewfinder();
layout->addWidget(viewfinder);// Set the camera viewfinder camera->setViewfinder(viewfinder); camera->start();
-
Actually, I want to access camera inside oven and but In my case I'm it's showing camera not found...
When I try to run sample code for detecting the camera of my pc and I'm able to do it,
Can anyone tell what approach I need to do for detecting the camera inside ovenThis is my code->>
layout = new QVBoxLayout(this);
QList<QCameraInfo> cameras = QCameraInfo::availableCameras();
if (cameras.isEmpty()) {
qDebug() << "No cameras found.";
return;
}
camera = new QCamera(cameras.first());
viewfinder = new QCameraViewfinder();
layout->addWidget(viewfinder);// Set the camera viewfinder camera->setViewfinder(viewfinder); camera->start();
-
Hi,
That does not answer the how is the camera accessed.
It is a USB device ? A network camera ? -
Actually, I want to access camera inside oven and but In my case I'm it's showing camera not found...
When I try to run sample code for detecting the camera of my pc and I'm able to do it,
Can anyone tell what approach I need to do for detecting the camera inside ovenThis is my code->>
layout = new QVBoxLayout(this);
QList<QCameraInfo> cameras = QCameraInfo::availableCameras();
if (cameras.isEmpty()) {
qDebug() << "No cameras found.";
return;
}
camera = new QCamera(cameras.first());
viewfinder = new QCameraViewfinder();
layout->addWidget(viewfinder);// Set the camera viewfinder camera->setViewfinder(viewfinder); camera->start();
@xylo212 said in Want to show detect camera using QCamera:
When I try to run sample code for detecting the camera of my pc and I'm able to do it
Do you mean Qt example code? If so then compare that code with what you're doing.
-
What are you doing differently between your code and the working example ?
-
@SGaist said in Want to show detect camera using QCamera:
What are you doing differently between your code and the working example ?
I assume @xylo212 is talking about a different camera... the camera from the computer works, while the "oven camera" (whatever it is) does not... maybe driver or connection issue.
No one can tell if @xylo212 doesn't provide more info.