forked from mateosalta/cuddly-bassoon
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.cpp
39 lines (31 loc) · 1.12 KB
/
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
34
35
36
37
38
39
#include <QGuiApplication>
#include <QCoreApplication>
#include <QUrl>
#include <QString>
#include <QQuickStyle>
#include <QQmlEngine>
#include <QQmlContext>
#include <QQmlApplicationEngine>
#include <QQuickView>
#include <QVector>
#include <QtWebEngine/qtwebengineglobal.h>
int main(int argc, char** argv) {
QGuiApplication::setOrganizationName("youtube-web.mateo-salta");
QGuiApplication::setApplicationName("youtube-web.mateo-salta");
QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
//QCoreApplication::setAttribute(Qt::AA_ShareOpenGLContexts);
//qputenv("QTWEBENGINE_CHROMIUM_FLAGS", "");
if (qgetenv("QT_QPA_PLATFORM") == "wayland") {
qputenv("QT_WAYLAND_SHELL_INTEGRATION", "wl-shell");
qputenv("QT_SCALE_FACTOR", "1.7");
qputenv("QT_WEBENGINE_DISABLE_GPU","1");
}
QGuiApplication app(argc, argv);
QQuickView view;
view.setFlags(Qt::Window | Qt::WindowTitleHint);
view.setResizeMode(QQuickView::SizeRootObjectToView);
view.setColor(Qt::black);
view.setSource(QUrl("qrc:///app/Main.qml"));
view.show();
return app.exec();
}