Hello Guys,
I got small problem with my app.
What I should do to capture "alt+f4" event and assign to it my own acction.
I use QMainWindow class.
I will be gratefull 4 any tips.
Printable View
Hello Guys,
I got small problem with my app.
What I should do to capture "alt+f4" event and assign to it my own acction.
I use QMainWindow class.
I will be gratefull 4 any tips.
You should reimplement QWidget::closeEvent.
Thanks it works fine !
But now I have another problem:
<code>
void QWidget::closeEvent(QCloseEvent *event)
{
event->ignore();
}
</code>
How can I now gain access to action from my own QMainWindow ?
Is there any simple way ?
Didn't get what an action do you mean.
In my own main window when someone click on close option, it will start action which display new QDialog window with question like "Do u really want to quit?" Yes|No
See Main window example. Especially how MainWindow::closeEvent works.