-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathmain.cpp
33 lines (27 loc) · 891 Bytes
/
main.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#include "lauwebcamerawidget.h"
#include <QApplication>
#include <QSurfaceFormat>
int main(int argc, char *argv[])
{
QSurfaceFormat format;
format.setDepthBufferSize(10);
format.setMajorVersion(4);
format.setMinorVersion(1);
format.setProfile(QSurfaceFormat::CoreProfile);
format.setRenderableType(QSurfaceFormat::OpenGL);
QSurfaceFormat::setDefaultFormat(format);
#ifndef Q_OS_LINUX
QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
#endif
QApplication::setAttribute(Qt::AA_UseDesktopOpenGL);
QApplication::setAttribute(Qt::AA_ShareOpenGLContexts);
QApplication a(argc, argv);
a.setOrganizationName(QString("Lau Consulting Inc"));
a.setOrganizationDomain(QString("drhalftone.com"));
a.setApplicationName(QString("LAUWebCamera"));
LAUWebCameraDialog w(QCamera::CaptureVideo);
if (w.isValid()) {
return w.exec();
}
return (0);
}