Fix shortcuts in dock widgets with custom title bar
QWidgetResizeHandler cannot be sure that it will see the MouseReleaseEvent and therefore buttonDown could be set wrong (and is set wrong in QGraphicsViews). When the mouse is up, the widget should not think it is moving or re-sizing the dock widget. A similar fix exists in the code a few lines above. Task-number: QTBUG-70596 Change-Id: I52ce487836bc71da8fd7d71f8a89e21b51406d00 Reviewed-by: Sérgio Martins <sergio.martins@kdab.com> Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de> Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
This commit is contained in:
parent
b7a123a6ee
commit
f30bf5fbd5
@ -192,6 +192,7 @@ bool QWidgetResizeHandler::eventFilter(QObject *o, QEvent *ee)
|
||||
keyPressEvent(static_cast<QKeyEvent *>(ee));
|
||||
break;
|
||||
case QEvent::ShortcutOverride:
|
||||
buttonDown &= ((QGuiApplication::mouseButtons() & Qt::LeftButton) != Qt::NoButton);
|
||||
if (buttonDown) {
|
||||
ee->accept();
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user