Merge pull request #6342 from spycrab/qt_rw_flicker
Qt/RenderWidget: Avoid flickering
This commit is contained in:
commit
987bec2fd5
|
@ -58,6 +58,12 @@ bool RenderWidget::event(QEvent* event)
|
||||||
QKeyEvent* ke = static_cast<QKeyEvent*>(event);
|
QKeyEvent* ke = static_cast<QKeyEvent*>(event);
|
||||||
if (ke->key() == Qt::Key_Escape)
|
if (ke->key() == Qt::Key_Escape)
|
||||||
emit EscapePressed();
|
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;
|
break;
|
||||||
}
|
}
|
||||||
case QEvent::MouseMove:
|
case QEvent::MouseMove:
|
||||||
|
|
Loading…
Reference in New Issue