diff --git a/CMakeLists.txt b/CMakeLists.txt index 530e1cd..712d353 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -29,7 +29,7 @@ include(ECMPoQmTools) kde_enable_exceptions() -find_package(Qt5 ${QT_MIN_VERSION} REQUIRED NO_MODULE COMPONENTS Core Quick Test Gui QuickControls2 Widgets Sql X11Extras QmlImportScanner) +find_package(Qt5 ${QT_MIN_VERSION} REQUIRED NO_MODULE COMPONENTS Core Quick Test Gui QuickControls2 Widgets Sql X11Extras QmlImportScanner WebEngine) find_package(KF5 ${KF_MIN_VERSION} REQUIRED COMPONENTS Kirigami2 CoreAddons I18n Archive) # find_package(PkgConfig REQUIRED) @@ -124,6 +124,7 @@ target_link_libraries(${CRATE} INTERFACE Qt5::Widgets Qt5::Sql Qt5::X11Extras + Qt5::WebEngine KF5::Kirigami2 KF5::I18n KF5::Archive diff --git a/flake.nix b/flake.nix index 9412786..8067301 100644 --- a/flake.nix +++ b/flake.nix @@ -48,6 +48,7 @@ qt5.qtx11extras qt5.qtmultimedia qt5.qtwayland + qt5.qtwebengine libsForQt5.kirigami2 libsForQt5.qqc2-desktop-style libsForQt5.karchive diff --git a/src/main.cpp b/src/main.cpp index a772fce..5e160b2 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -13,6 +13,7 @@ #include #include #include +#include #include #include @@ -99,6 +100,7 @@ int main(int argc, char *argv[]) // qDebug() << QSurfaceFormat::defaultFormat(); QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); QApplication::setWindowIcon(QIcon::fromTheme(QStringLiteral("video-display"))); + QtWebEngine::initialize(); QApplication app(argc, argv); KLocalizedString::setApplicationDomain("librepresenter"); KAboutData aboutData("librepresenter", i18n("Libre Presenter"), "0.1", diff --git a/src/qml/presenter/Slide.qml b/src/qml/presenter/Slide.qml index a15fa46..c95821f 100644 --- a/src/qml/presenter/Slide.qml +++ b/src/qml/presenter/Slide.qml @@ -168,10 +168,11 @@ Item { } } - WebEngine { + WebEngineView { id: web anchors.fill: parent - source: webSource + url: webSource + visible: false } }