Minor tweaks.

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
This commit is contained in:
Yuhang Zhao 2020-11-13 09:56:11 +08:00
parent ddef1cab43
commit 5fe936f631
3 changed files with 3 additions and 3 deletions

View File

@ -112,7 +112,7 @@ int main(int argc, char *argv[])
mainWindow->resize(800, 600); mainWindow->resize(800, 600);
FramelessWindowsManager::moveWindowToDesktopCenter(mainWindow); //FramelessWindowsManager::moveWindowToDesktopCenter(mainWindow);
mainWindow->show(); mainWindow->show();

View File

@ -102,7 +102,7 @@ int main(int argc, char *argv[])
widget.resize(800, 600); widget.resize(800, 600);
FramelessWindowsManager::moveWindowToDesktopCenter(&widget); //FramelessWindowsManager::moveWindowToDesktopCenter(&widget);
widget.show(); widget.show();

View File

@ -1138,7 +1138,7 @@ void updateQtFrame_internal(const HWND handle, const bool resetToDefault = false
const int tbh = resetToDefault const int tbh = resetToDefault
? 0 ? 0
: WinNativeEventFilter::getSystemMetric( : WinNativeEventFilter::getSystemMetric(
handle, WinNativeEventFilter::SystemMetric::TitleBarHeight); handle, WinNativeEventFilter::SystemMetric::TitleBarHeight, true);
#ifdef QT_WIDGETS_LIB #ifdef QT_WIDGETS_LIB
const QWidget *widget = QWidget::find(reinterpret_cast<WId>(handle)); const QWidget *widget = QWidget::find(reinterpret_cast<WId>(handle));
if (widget && widget->isTopLevel()) { if (widget && widget->isTopLevel()) {