1
Fork 0
mirror of https://github.com/redstrate/Astra.git synced 2025-04-20 11:47:46 +00:00

Initialize QtWebEngine properly

This commit is contained in:
Joshua Goins 2023-08-18 22:21:38 -04:00
parent b878b923b6
commit 4bedd006ec
3 changed files with 6 additions and 1 deletions

View file

@ -44,7 +44,8 @@ find_package(Qt5 ${QT_MIN_VERSION} NO_MODULE REQUIRED COMPONENTS
Core
Widgets
Network
QuickControls2)
QuickControls2
WebEngine)
find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS Kirigami2 I18n Config CoreAddons)
find_package(PkgConfig REQUIRED)

View file

@ -49,6 +49,7 @@ target_link_libraries(astra PRIVATE
Qt5::Widgets
Qt5::Quick
Qt5::QuickControls2
Qt5::WebEngine
KF5::Kirigami2
KF5::I18n
KF5::ConfigCore

View file

@ -7,6 +7,7 @@
#include <QApplication>
#include <QCommandLineParser>
#include <QQuickStyle>
#include <QtWebEngine>
#include "astra-version.h"
#include "gameinstaller.h"
@ -18,6 +19,8 @@ int main(int argc, char *argv[])
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
QtWebEngine::initialize();
QApplication app(argc, argv);
// Default to org.kde.desktop style unless the user forces another style
if (qEnvironmentVariableIsEmpty("QT_QUICK_CONTROLS_STYLE")) {