Hi Guys

How do we diable the Maximize Button in QMainWindow,

I am using KDE, and the I tried Playing the WindowFlags example. But to No avail.

I also tried doing this
Qt Code:
  1. #include <QApplication>
  2. #include <QMainWindow>
  3.  
  4. int main(int argc, char *argv[]) {
  5.  
  6. QApplication app( argc, argv );
  7.  
  8. QMainWindow win(0, Qt::WindowTitleHint |
  9. Qt::WindowSystemMenuHint |
  10. Qt::WindowMinimizeButtonHint );
  11.  
  12. win.show();
  13.  
  14. return app.exec();
  15. }
To copy to clipboard, switch view to plain text mode 


But failed,

Any Idea