Hi,
The title says it all. I want to do something evverytime my window is minimized, or put to background, everytime I switch to other window.
I thought it had to do with losing focus so I tried :
{
if( event
->type
() == QEvent::FocusOut ) {
Note::writeToFile();
return true;
}
return false;
}
bool Note::eventFilter(QObject *object, QEvent *event)
{
if( event->type() == QEvent::FocusOut )
{
Note::writeToFile();
return true;
}
return false;
}
To copy to clipboard, switch view to plain text mode
with
installEventFilter(this);
installEventFilter(this);
To copy to clipboard, switch view to plain text mode
on the cosntructor.
But it didn't work. It works with QEvent::KeyPress however.
Bookmarks