先看效果
编辑:已添加虚拟键盘辅助输入,添加二维码识别,用的QZxing
初始化
auto mainLayout = new QHBoxLayout(this);m_viewfinder = new QCameraViewfinder(this);m_viewfinder->setStyleSheet("border-radius: 20px;background-color:rgb(43,48,70)");mainLayout->addWidget(m_viewfinder,8);
选择相机
void cameraeidget::selectDevice(const QCameraInfo &cameraInfo)
{bool restart = isStarted();if (isStarted()) {stop();}if (m_camera) {