Debian Codegraph @

tests/manual/examples/opengl/contextinfo/main.cpp

raw
1 // Copyright (C) 2016 The Qt Company Ltd.
2 // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
3
4 #include <QApplication>
5 #include "widget.h"
6
7 int main(int argc, char **argv)
8 {
9 for (int i = 1; i < argc; ++i) {
10 if (!qstrcmp(argv[i], "-g"))
11 QCoreApplication::setAttribute(Qt::AA_UseOpenGLES);
12 else if (!qstrcmp(argv[i], "-s"))
13 QCoreApplication::setAttribute(Qt::AA_UseSoftwareOpenGL);
14 else if (!qstrcmp(argv[i], "-d"))
15 QCoreApplication::setAttribute(Qt::AA_UseDesktopOpenGL);
16 }
17
18 QApplication app(argc, argv);
19
20 Widget w;
21 w.resize(700, 800);
22 w.show();
23
24 return app.exec();
25 }