I didn't manage to do it by using the Qt window flags, but it is possible using winapi:
Qt Code:
  1. #ifdef Q_WS_WIN
  2. CMenu* menu = this->GetSystemMenu(FALSE);
  3. menu->ModifyMenu(SC_CLOSE, MF_BYCOMMAND | MF_GRAYED );
  4. #endif
To copy to clipboard, switch view to plain text mode