From 438327d56e7c88dd3fbee3d83223d29e5de90653 Mon Sep 17 00:00:00 2001 From: Yuhang Zhao <zhaoyuhang@rankyee.com> Date: 周一, 11 12月 2023 17:42:53 +0800 Subject: [PATCH] simplify code --- examples/mainwindow/mainwindow.cpp | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/examples/mainwindow/mainwindow.cpp b/examples/mainwindow/mainwindow.cpp index ce3d742..f98f43f 100644 --- a/examples/mainwindow/mainwindow.cpp +++ b/examples/mainwindow/mainwindow.cpp @@ -77,10 +77,10 @@ windowBar->setHostWidget(this); agent->setTitleBar(windowBar); - agent->setSystemButton(QWK::CoreWindowAgent::WindowIcon, iconButton); - agent->setSystemButton(QWK::CoreWindowAgent::Minimize, minButton); - agent->setSystemButton(QWK::CoreWindowAgent::Maximize, maxButton); - agent->setSystemButton(QWK::CoreWindowAgent::Close, closeButton); + agent->setSystemButton(QWK::WindowAgentBase::WindowIcon, iconButton); + agent->setSystemButton(QWK::WindowAgentBase::Minimize, minButton); + agent->setSystemButton(QWK::WindowAgentBase::Maximize, maxButton); + agent->setSystemButton(QWK::WindowAgentBase::Close, closeButton); agent->setHitTestVisible(menuBar, true); connect(windowBar, &QWK::WindowBar::minimizeRequested, this, &QWidget::showMinimized); @@ -99,5 +99,6 @@ setMenuWidget(windowBar); setCentralWidget(clockWidget); setWindowTitle("Example MainWindow"); + // setContentsMargins({0, 1, 0, 0}); resize(640, 480); } -- Gitblit v1.9.1