mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-19 21:23:52 +00:00
return/enter activate the selected button
This commit is contained in:
parent
50ee815dd8
commit
365b721878
2 changed files with 13 additions and 0 deletions
|
@ -12,6 +12,17 @@ void CSVWidget::PushButton::keyPressEvent (QKeyEvent *event)
|
|||
QPushButton::keyPressEvent (event);
|
||||
}
|
||||
|
||||
void CSVWidget::PushButton::keyReleaseEvent (QKeyEvent *event)
|
||||
{
|
||||
if (event->key()==Qt::Key_Return || event->key()==Qt::Key_Enter)
|
||||
{
|
||||
mKeepOpen = event->modifiers() & Qt::ShiftModifier;
|
||||
emit clicked();
|
||||
}
|
||||
|
||||
QPushButton::keyReleaseEvent (event);
|
||||
}
|
||||
|
||||
void CSVWidget::PushButton::mouseReleaseEvent (QMouseEvent *event)
|
||||
{
|
||||
mKeepOpen = event->button()==Qt::LeftButton && (event->modifiers() & Qt::ShiftModifier);
|
||||
|
|
|
@ -15,6 +15,8 @@ namespace CSVWidget
|
|||
|
||||
virtual void keyPressEvent (QKeyEvent *event);
|
||||
|
||||
virtual void keyReleaseEvent (QKeyEvent *event);
|
||||
|
||||
virtual void mouseReleaseEvent (QMouseEvent *event);
|
||||
|
||||
public:
|
||||
|
|
Loading…
Reference in a new issue