forked from qt-creator/qt-creator
MiniProjectTargetSelector: Fix inconsitency in key handling
The keypress event would be forwarded to QWidget::keyPressEvent, but not the release event. Change-Id: I98e87b9f8da1133f55b2f4fae246047db1809536 Reviewed-by: Eike Ziller <eike.ziller@digia.com>
This commit is contained in:
@@ -1327,10 +1327,12 @@ void MiniProjectTargetSelector::keyPressEvent(QKeyEvent *ke)
|
|||||||
if (ke->key() == Qt::Key_Return
|
if (ke->key() == Qt::Key_Return
|
||||||
|| ke->key() == Qt::Key_Enter
|
|| ke->key() == Qt::Key_Enter
|
||||||
|| ke->key() == Qt::Key_Space
|
|| ke->key() == Qt::Key_Space
|
||||||
|| ke->key() == Qt::Key_Escape)
|
|| ke->key() == Qt::Key_Escape) {
|
||||||
hide();
|
hide();
|
||||||
|
} else {
|
||||||
QWidget::keyPressEvent(ke);
|
QWidget::keyPressEvent(ke);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void MiniProjectTargetSelector::keyReleaseEvent(QKeyEvent *ke)
|
void MiniProjectTargetSelector::keyReleaseEvent(QKeyEvent *ke)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user