From fe50d30edcc31618905ec3e3dc39c8b78cee49db Mon Sep 17 00:00:00 2001
From: Yuhang Zhao <zhaoyuhang@rankyee.com>
Date: 周二, 19 12月 2023 18:09:23 +0800
Subject: [PATCH] minor tweaks

---
 examples/mainwindow/mainwindow.cpp |    6 +-----
 1 files changed, 1 insertions(+), 5 deletions(-)

diff --git a/examples/mainwindow/mainwindow.cpp b/examples/mainwindow/mainwindow.cpp
index 96736de..8b32fe7 100644
--- a/examples/mainwindow/mainwindow.cpp
+++ b/examples/mainwindow/mainwindow.cpp
@@ -42,7 +42,6 @@
     }
 
     setWindowTitle(tr("Example MainWindow"));
-    resize(800, 600);
 }
 
 static inline void emulateLeaveEvent(QWidget *widget) {
@@ -107,10 +106,7 @@
 
 void MainWindow::installWindowAgent() {
     // 1. Setup window agent
-    auto agent = new QWK::WidgetWindowAgent(this);
-    if (!agent->setup(this)) {
-        qFatal("QWK failed to initialize.");
-    }
+    QWK::WidgetWindowAgent *agent = QWK::setupWidgetWindow(this);
 
     // 2. Construct your title bar
     auto menuBar = []() {

--
Gitblit v1.9.1