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,
Image format conversion Count the number of letters (java Language implementation ) Using orthogonal table method to design test cases One is called “ Asking for the train ” A small village Finally got the train VaR - Value at risk - Monte Carlo method - Python How to build data security system ?python: Convert a file to a binary file (binary)vue use vue-clipboard2 Realize the function of copy link 13. solve git Merge conflict uniapp Summary of page value transfer