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.
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.
Qt Assistant -- rocks!
please, use tags [CODE] & [/CODE].
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.
Qt Assistant -- rocks!
please, use tags [CODE] & [/CODE].
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.
Qt Assistant -- rocks!
please, use tags [CODE] & [/CODE].
Bookmarks