【发布时间】:2016-05-14 17:10:54
【问题描述】:
我需要知道如何使用 qt 打开相机闪光灯或手电筒?有没有办法做到这一点?我正在使用 qt 5.5。请给建议。
这是我的代码
#include "flashon.h"
FlashOn::FlashOn()
{
cam = new QCamera;
camExpos = cam->exposure ();
}
FlashOn::~FlashOn()
{
delete this;
}
void FlashOn::lightOn()
{
camExpos->setFlashMode (QCameraExposure::FlashOn);
qDebug() << " light is on ";
}
【问题讨论】:
-
请更具体。前任。设备、部署等
-
我正在构建一个跨平台应用程序来打开相机闪光灯。我的代码很简单,但它不起作用。我能做什么?
-
您可以在您的 C++ 应用程序(或其他)中实现一个目标 c 文件,然后在此处使用 tibidabo 解决方案:stackoverflow.com/questions/5882829/…
标签: qt