Qt/RenderWidget: Avoid flickering

This commit is contained in:
spycrab 2018-01-29 18:35:33 +01:00
parent c81ac1a81d
commit e5994706eb

View File

@ -58,6 +58,12 @@ bool RenderWidget::event(QEvent* event)
QKeyEvent* ke = static_cast<QKeyEvent*>(event);
if (ke->key() == Qt::Key_Escape)
emit EscapePressed();
// The render window might flicker on some platforms because Qt tries to change focus to a new
// element when there is none (?) Handling this event before it reaches QWidget fixes the issue.
if (ke->key() == Qt::Key_Tab)
return true;
break;
}
case QEvent::MouseMove: