Qt How to prevent users from maximizing windows

use Qt Write a window , If inherited QDialog, The window has only the close button , If inherited QWidget, Then there is closure , Maximize , Minimize three buttons , How can I make the maximize button unavailable , But what about closing and minimizing ?
It is required to be able to cross platform , Right? Qt This cannot be done ?

------ Solution --------------------
Of course you can .
Set the maximum value of the form to the value of your current window  
------ Solution --------------------
You can view the help documentation :
void setWindowFlags ( Qt::WindowFlags type )
You can view it demo/example:
Window Flags Example. 
------ Solution --------------------
this->setWindowFlags(Qt::Dialog | Qt::WindowMinimizeButtonHint);,
It should be hidden , That's better  
------ Solution --------------------
setWindowFlags ( Qt::WindowFlags type )
Qt::FrameWindowHint: Windows without borders
Qt::WindowStaysOnTopHint:// Always at the top window
Qt::CustomizeWindowHint:// Custom window title bar , The following flag must be used with this flag to be valid , Otherwise, the window will have a default title bar
Qt::WindowTitleHint: Show window title bar
Qt::WindowSystemMenuHint:// Display system menu
Qt::WindowMinimizeButtonHint:// Show minimize button
Qt::WindowMaximizeButtonHint:// Show maximize button
Qt::WindowMinMaxButtonsHint:// Show minimize and maximize buttons
Qt::WindowCloseButtonHint:// Show close button  
------ Solution --------------------
setWindowFlags(Qt::FramelessWindowHint); Just hide it ...

©2019-2020 Toolsou All rights reserved,
Non preemptive static priority scheduling algorithm for operating system (C language )Go Language learning notes (GUI programming )XCTF Attack and defense world web Advanced practice _ 2_lottery What's the difference between computer major and training background ?python realization vlookup_ Dry goods I : Why python It's inside vlookup Bubble sort primary springboot2 Separation of front and rear platforms ,token Put in header Pit for verification Python Case conversion of letters ( Two methods )javascript event ( Detailed explanation of zero basis )Unity2019 UIElement note ( ten ) Simple exercise 2