aboutsummaryrefslogtreecommitdiffhomepage
path: root/DOCS/client_api_examples/qt_opengl/main.cpp
diff options
context:
space:
mode:
authorGravatar wang-bin <wbsecg1@gmail.com>2015-10-11 17:19:36 +0800
committerGravatar wm4 <wm4@nowhere>2015-10-11 13:58:09 +0200
commit52de5ea6addb62a89a79689397b055ba8fab1795 (patch)
treec05c8961fbc3356e4b1152624cb4121f1c4e538d /DOCS/client_api_examples/qt_opengl/main.cpp
parent78caf6ae8634b9fe9589187d8febb927dce2ddeb (diff)
DOCS/client_api_examples: add qt widget + opengl-cb example
Diffstat (limited to 'DOCS/client_api_examples/qt_opengl/main.cpp')
-rw-r--r--DOCS/client_api_examples/qt_opengl/main.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/DOCS/client_api_examples/qt_opengl/main.cpp b/DOCS/client_api_examples/qt_opengl/main.cpp
new file mode 100644
index 0000000000..086a4b4617
--- /dev/null
+++ b/DOCS/client_api_examples/qt_opengl/main.cpp
@@ -0,0 +1,13 @@
+#include <QApplication>
+#include "mainwindow.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication a(argc, argv);
+ // Qt sets the locale in the QApplication constructor, but libmpv requires
+ // the LC_NUMERIC category to be set to "C", so change it back.
+ setlocale(LC_NUMERIC, "C");
+ MainWindow w;
+ w.show();
+ return a.exec();
+}