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,
c Language implementation 《 Student management system 》 No hole is the future of mobile phone ? There are still many problems to be solved Junior , A little sense , Just for mutual encouragement How to use Vue Used in Echarts Visual Library The 11th Blue Bridge Cup Java The second provincial competition B Group part Python- be based on OpenCV Contour fill for flooding algorithm hole filling 【C#】 The realization of student achievement information management system List Common interview questions in the collection and simple ideas China Mobile Science Popularization : Why do mobile networks call “ Cellular mobile network ”【Golang Basic series 10 】Go language On conditional sentences if