Commit e616d0df authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt: plugins dialog, fix keyevents

Close #5167
parent bab3d82a
...@@ -169,6 +169,15 @@ PluginTab::~PluginTab() ...@@ -169,6 +169,15 @@ PluginTab::~PluginTab()
treePlugins->header()->saveState() ); treePlugins->header()->saveState() );
} }
void PluginTab::keyPressEvent( QKeyEvent *keyEvent )
{
if( keyEvent->key() == Qt::Key_Return ||
keyEvent->key() == Qt::Key_Enter )
keyEvent->accept();
else
keyEvent->ignore();
}
bool PluginTreeItem::operator< ( const QTreeWidgetItem & other ) const bool PluginTreeItem::operator< ( const QTreeWidgetItem & other ) const
{ {
int col = treeWidget()->sortColumn(); int col = treeWidget()->sortColumn();
...@@ -236,7 +245,11 @@ ExtensionTab::~ExtensionTab() ...@@ -236,7 +245,11 @@ ExtensionTab::~ExtensionTab()
// Do not close on ESC or ENTER // Do not close on ESC or ENTER
void ExtensionTab::keyPressEvent( QKeyEvent *keyEvent ) void ExtensionTab::keyPressEvent( QKeyEvent *keyEvent )
{ {
keyEvent->ignore(); if( keyEvent->key() == Qt::Key_Return ||
keyEvent->key() == Qt::Key_Enter )
keyEvent->accept();
else
keyEvent->ignore();
} }
// Show more information // Show more information
......
...@@ -70,6 +70,9 @@ class PluginTab : public QVLCFrame ...@@ -70,6 +70,9 @@ class PluginTab : public QVLCFrame
{ {
Q_OBJECT Q_OBJECT
protected:
virtual void keyPressEvent( QKeyEvent *keyEvent );
private: private:
PluginTab( intf_thread_t *p_intf ); PluginTab( intf_thread_t *p_intf );
virtual ~PluginTab(); virtual ~PluginTab();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment