From 1a1f26d9e4ab6a4fe51baa78e40c4cdf3f402bcf Mon Sep 17 00:00:00 2001
From: Sine Striker <trueful@163.com>
Date: 周四, 07 12月 2023 14:27:00 +0800
Subject: [PATCH] Add context factory

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

diff --git a/examples/mainwindow/mainwindow.cpp b/examples/mainwindow/mainwindow.cpp
index adcf6cd..ce3d742 100644
--- a/examples/mainwindow/mainwindow.cpp
+++ b/examples/mainwindow/mainwindow.cpp
@@ -53,42 +53,19 @@
         return menuBar;
     }();
 
-    static const auto buttonStyleSheet = QLatin1String{ R"(
-QPushButton {
-    background-color:white;
-    color:black;
-}
-QPushButton:hover {
-    background-color:black;
-    color:white;
-}
-QPushButton:pressed {
-    background-color:red;
-    color:white;
-}
-)" };
-
     auto iconButton = new QPushButton("I");
-    iconButton->setFlat(true);
     iconButton->setAttribute(Qt::WA_Hover);
     iconButton->setMouseTracking(true);
-    iconButton->setStyleSheet(buttonStyleSheet);
     auto minButton = new QPushButton("鈥�");
-    minButton->setFlat(true);
     minButton->setAttribute(Qt::WA_Hover);
     minButton->setMouseTracking(true);
-    minButton->setStyleSheet(buttonStyleSheet);
     auto maxButton = new QPushButton("馃棖");
     maxButton->setCheckable(true);
-    maxButton->setFlat(true);
     maxButton->setAttribute(Qt::WA_Hover);
     maxButton->setMouseTracking(true);
-    maxButton->setStyleSheet(buttonStyleSheet);
     auto closeButton = new QPushButton("鉁�");
-    closeButton->setFlat(true);
     closeButton->setAttribute(Qt::WA_Hover);
     closeButton->setMouseTracking(true);
-    closeButton->setStyleSheet(buttonStyleSheet);
 
     auto windowBar = new QWK::WindowBar();
     windowBar->setIconButton(iconButton);

--
Gitblit v1.9.1