Sorry, my question was not very clear.

In fact, I have a frameless window with a QPushButton trying to behave like the minimize button. The clicked() signal of the QPushButton is connected to this slot:

Qt Code:
  1. void MainWindow::slotMinimizeWindow()
  2. {
  3. this->setWindowState(Qt::WindowMinimized);
  4. }
To copy to clipboard, switch view to plain text mode 

Hope this helps to understand my question.

Thanks