| | |
| | | return menuBar; |
| | | }(); |
| | | |
| | | static const auto buttonStyleSheet = QLatin1String{ "QPushButton{color:black;};QPushButton:hover{background-color:black;color:white;}" }; |
| | | |
| | | auto iconButton = new QPushButton("I"); |
| | | iconButton->setStyleSheet(buttonStyleSheet); |
| | | iconButton->setAttribute(Qt::WA_Hover); |
| | | iconButton->setMouseTracking(true); |
| | | auto minButton = new QPushButton("—"); |
| | | minButton->setStyleSheet(buttonStyleSheet); |
| | | minButton->setAttribute(Qt::WA_Hover); |
| | | minButton->setMouseTracking(true); |
| | | auto maxButton = new QPushButton("🗖"); |
| | | maxButton->setStyleSheet(buttonStyleSheet); |
| | | maxButton->setCheckable(true); |
| | | maxButton->setAttribute(Qt::WA_Hover); |
| | | maxButton->setMouseTracking(true); |
| | | auto closeButton = new QPushButton("✖"); |
| | | closeButton->setStyleSheet(buttonStyleSheet); |
| | | closeButton->setAttribute(Qt::WA_Hover); |
| | | closeButton->setMouseTracking(true); |
| | | |
| | | auto windowBar = new QWK::WindowBar(); |
| | | windowBar->setIconButton(iconButton); |
| | |
| | | setMenuWidget(windowBar); |
| | | setCentralWidget(clockWidget); |
| | | setWindowTitle("Example MainWindow"); |
| | | resize(1024, 768); |
| | | resize(640, 480); |
| | | } |