setWindowFlags(Qt::WindowCloseButtonHint);// Ha ha, the window has only one close button
 

usage method :1: clientMainWindow::clientMainWindow(QWidget *parent) :
QMainWindow(parent,Qt::WindowCloseButtonHint) { }

 

2

 

clientMainWindow::clientMainWindow(QWidget *parent)

 

: QMainWindow(parent ) {

 

setWindowFlags(Qt::WindowCloseButtonHint);

}

 

More window samples :

 

Qt::WindowContextHelpButtonHint  It's like a dialog box , There's a question mark and a close button

 

Qt::CustomizeWindowHint There is no title bar There are no buttons
If you show up there, you can't get there , It can't be moved or dragged , Right click on the taskbar and nothing , There is no taskbar window name , It's good to do rogue software , Unfortunately, it can be turned off from the task manager grey

 

Qt::WindowTitleHint  Also, the window has only one close button

 

Qt::WindowSystemMenuHint It's still the same, just a close button

 

Qt::WindowCloseButtonHint It's still the same, just a close button

 

Qt::WindowMaximizeButtonHint  You can see at a glance what happened to the minimize button ... Originally not available ....

 

Qt::WindowMinimizeButtonHint  The restore button is not available ..

 

Qt::SubWindow  The window has no buttons but a title bar You can't see anything in the mission

 

Qt::Desktop It's not on the desktop, it's not on the task . But there are still some in the mission manager ...

 

Qt::SplashScreen  There is no title bar There are no buttons If you show up there, you can't get there , It can't be moved or dragged , Right click on the taskbar and nothing , There is no taskbar window name ,
Unfortunately, it can be turned off from the task manager white

 

Qt::ToolTip There is no title bar There are no buttons If you show up there, you can't get there , It can't be moved or dragged , Right click on the taskbar and nothing , There is no taskbar window name ,
Unfortunately, it can be turned off from the task manager white Have a good job , top window Always on top ..

 

Qt::Tool There's a little close button , But it doesn't really close ....

Technology
©2019-2020 Toolsou All rights reserved,
One is called “ Asking for the train ” A small village Finally got the train Spring Boot Lesson 16 :SpringBoot Implementation of multithreading with injection class Chrome OS, For programmers and Windows What does it mean ? Internet Marketing JAVA Convert a string to a numeric type I've been drinking soft water for three years ? What is the use of soft water and water softener You don't know ——HarmonyOS Talking about uni-app Page value transfer problem JavaScript Medium Call and ApplySparkSQL Achieve partition overlay write Character recognition technology of vehicle license plate based on Neural Network