Enter key opens selected game in the game list.
This commit is contained in:
parent
58b3552233
commit
704d9cbea5
|
@ -4,6 +4,7 @@
|
|||
|
||||
#include <QDesktopServices>
|
||||
#include <QHeaderView>
|
||||
#include <QKeyEvent>
|
||||
#include <QMenu>
|
||||
#include <QUrl>
|
||||
|
||||
|
@ -161,3 +162,10 @@ void GameList::ConsiderViewChange()
|
|||
setCurrentWidget(m_empty);
|
||||
}
|
||||
}
|
||||
void GameList::keyReleaseEvent(QKeyEvent* event)
|
||||
{
|
||||
if (event->key() == Qt::Key_Return)
|
||||
emit GameSelected();
|
||||
else
|
||||
QStackedWidget::keyReleaseEvent(event);
|
||||
}
|
||||
|
|
|
@ -52,4 +52,6 @@ private:
|
|||
QTableView* m_table;
|
||||
QLabel* m_empty;
|
||||
bool m_prefer_table;
|
||||
protected:
|
||||
void keyReleaseEvent(QKeyEvent* event) override;
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue