Quote Originally Posted by arnaizf View Post
I did it a few minutes ago for my application. In main.cpp, write:



Now you do not have close button, neither a menu close and ALT-F4 won't work.
Hope this can be helpful.

I'm using Qt4 under Linux
I believe another way around would be hijacking close event, add this ti header file:
Qt Code:
  1. private:
  2. void closeEvent(QCloseEvent *event) override;
To copy to clipboard, switch view to plain text mode 

and this to cpp file:
Qt Code:
  1. void MainWindow::closeEvent(QCloseEvent *event)
  2. {
  3. cout << "Here in close" << endl;
  4. event->ignore();
  5. }
To copy to clipboard, switch view to plain text mode 

More info? https://doc.qt.io/qt-5/qwidget.html#closeEvent