From 9d0b89300ab64e86cdaac605f5693e59b9aace1a Mon Sep 17 00:00:00 2001 From: Chris Cochrun Date: Thu, 12 Jan 2023 13:43:07 -0600 Subject: [PATCH] trying to add window differently --- src/main.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main.cpp b/src/main.cpp index bdf055a..fbcf173 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -133,6 +133,8 @@ int main(int argc, char *argv[]) //Need to instantiate our slide QScopedPointer slide(new Slide); QScopedPointer filemanager(new File); + QQuickView *preswin = new QQuickView; + preswin->setSource(QUrl(QStringLiteral("qrc:qml/presenter/PresentationWindow.qml"))); // apparently mpv needs this class set // let's register mpv as well @@ -149,6 +151,7 @@ int main(int argc, char *argv[]) qmlRegisterType("org.presenter", 1, 0, "ServiceThing"); qmlRegisterSingletonInstance("org.presenter", 1, 0, "SlideObject", slide.get()); qmlRegisterSingletonInstance("org.presenter", 1, 0, "FileManager", filemanager.get()); + qmlRegisterSingletonInstance("org.presenter", 1, 0, "PresentationWindow", preswin); connectToDatabase(); @@ -170,6 +173,7 @@ int main(int argc, char *argv[]) QWindow *window = windowFromEngine(&engine); + window->setIcon(QIcon::fromTheme(QStringLiteral("system-config-display"))); // KWindowSystem::setMainWindow(&window); KWindowSystem::activateWindow(window); qDebug() << "00000000000000000000000000000000";