qml webengine is running

I'll need to figure out the best way to show the html slideshow later
but it's running and can accept html.
This commit is contained in:
Chris Cochrun 2023-04-28 05:46:02 -05:00
parent c1711f231b
commit a7e3cfa39f
4 changed files with 8 additions and 3 deletions

View file

@ -29,7 +29,7 @@ include(ECMPoQmTools)
kde_enable_exceptions() 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(KF5 ${KF_MIN_VERSION} REQUIRED COMPONENTS Kirigami2 CoreAddons I18n Archive)
# find_package(PkgConfig REQUIRED) # find_package(PkgConfig REQUIRED)
@ -124,6 +124,7 @@ target_link_libraries(${CRATE} INTERFACE
Qt5::Widgets Qt5::Widgets
Qt5::Sql Qt5::Sql
Qt5::X11Extras Qt5::X11Extras
Qt5::WebEngine
KF5::Kirigami2 KF5::Kirigami2
KF5::I18n KF5::I18n
KF5::Archive KF5::Archive

View file

@ -48,6 +48,7 @@
qt5.qtx11extras qt5.qtx11extras
qt5.qtmultimedia qt5.qtmultimedia
qt5.qtwayland qt5.qtwayland
qt5.qtwebengine
libsForQt5.kirigami2 libsForQt5.kirigami2
libsForQt5.qqc2-desktop-style libsForQt5.qqc2-desktop-style
libsForQt5.karchive libsForQt5.karchive

View file

@ -13,6 +13,7 @@
#include <QtSql> #include <QtSql>
#include <QSqlDatabase> #include <QSqlDatabase>
#include <QSqlTableModel> #include <QSqlTableModel>
#include <QtWebEngine>
#include <QObject> #include <QObject>
#include <QtGlobal> #include <QtGlobal>
@ -99,6 +100,7 @@ int main(int argc, char *argv[])
// qDebug() << QSurfaceFormat::defaultFormat(); // qDebug() << QSurfaceFormat::defaultFormat();
QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
QApplication::setWindowIcon(QIcon::fromTheme(QStringLiteral("video-display"))); QApplication::setWindowIcon(QIcon::fromTheme(QStringLiteral("video-display")));
QtWebEngine::initialize();
QApplication app(argc, argv); QApplication app(argc, argv);
KLocalizedString::setApplicationDomain("librepresenter"); KLocalizedString::setApplicationDomain("librepresenter");
KAboutData aboutData("librepresenter", i18n("Libre Presenter"), "0.1", KAboutData aboutData("librepresenter", i18n("Libre Presenter"), "0.1",

View file

@ -168,10 +168,11 @@ Item {
} }
} }
WebEngine { WebEngineView {
id: web id: web
anchors.fill: parent anchors.fill: parent
source: webSource url: webSource
visible: false
} }
} }