
Originally Posted by
December
I tied that.. but now just about everything has stopped working.. I tried returning both true and false, but still the main UI doesn't seem to draw, the close buttons etc don't work.
The event must be passed to the base class implementation so that the event gets further delivered to the correct specialized event handler. For example:
bool MyWidget
::event(QEvent* e
) {
if (e
->type
() == QEvent::WindowStateChange) {
// minimized, maximized or fullscreen state changed, do something..
}
return QWidget::event(e
);
// <-- important }
bool MyWidget::event(QEvent* e)
{
if (e->type() == QEvent::WindowStateChange)
{
// minimized, maximized or fullscreen state changed, do something..
}
return QWidget::event(e); // <-- important
}
To copy to clipboard, switch view to plain text mode
Bookmarks