Slot connected to what button? There's no exposed signal from the standard window minimise/restore/maximize controls (if they are present). What are you trying to do differently from the long accepted norms of behaviour for these window controls?
Slot connected to what button? There's no exposed signal from the standard window minimise/restore/maximize controls (if they are present). What are you trying to do differently from the long accepted norms of behaviour for these window controls?
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:
void MainWindow::slotMinimizeWindow() { this->setWindowState(Qt::WindowMinimized); }To copy to clipboard, switch view to plain text mode
Hope this helps to understand my question.
Thanks
I answer myself,
Playing around WindowState is no the correct way to do the thing. Instead I used:
Qt Code:
void MainWindow::slotMinimizeWindow() { this->showMinimized(); }To copy to clipboard, switch view to plain text mode
Still learning...
Since showMininized() is a slot, you can probably connect to it directly and don't need your slotMininizeWindow() anymore.
Cheers,
_
Thanks for the advice.
Bookmarks