Pressing Enter/Return Key While File Browse Widget is Focused Opens File Browser (#3304)
* Pressing enter or return opens file browse dialog on browse edit widgets Signed-off-by: nggieber <nggieber@amazon.com> * Remove unused header Signed-off-by: nggieber <nggieber@amazon.com>
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
|
||||
#include <QPushButton>
|
||||
#include <QHBoxLayout>
|
||||
#include <QKeyEvent>
|
||||
|
||||
namespace O3DE::ProjectManager
|
||||
{
|
||||
@@ -27,4 +28,14 @@ namespace O3DE::ProjectManager
|
||||
: FormBrowseEditWidget(labelText, "", parent)
|
||||
{
|
||||
}
|
||||
|
||||
void FormBrowseEditWidget::keyPressEvent(QKeyEvent* event)
|
||||
{
|
||||
int key = event->key();
|
||||
if (key == Qt::Key_Return || key == Qt::Key_Enter)
|
||||
{
|
||||
HandleBrowseButton();
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace O3DE::ProjectManager
|
||||
|
||||
Reference in New Issue
Block a user