diff --git a/src/kiwixapp.cpp b/src/kiwixapp.cpp index bc63eb5..528d242 100644 --- a/src/kiwixapp.cpp +++ b/src/kiwixapp.cpp @@ -15,7 +15,7 @@ #include #include #include -#ifdef Q_OS_WIN +#if defined(Q_OS_WIN) && QT_VERSION < QT_VERSION_CHECK(6, 0, 0) #include #endif @@ -96,7 +96,12 @@ void KiwixApp::init() #ifdef Q_OS_WIN QWindow *window = mp_mainWindow->windowHandle(); if (window) { - QWindowsWindowFunctions::setHasBorderInFullScreen(window, true); + #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) + QWindowsWindowFunctions::setHasBorderInFullScreen(window, true); + #else + HWND handle = reinterpret_cast(window->winId()); + SetWindowLongPtr(handle, GWL_STYLE, GetWindowLongPtr(handle, GWL_STYLE) | WS_BORDER); + #endif } #endif connect(this, &QtSingleApplication::messageReceived, this, [=](const QString &message) {