Index: /trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIStyledItemDelegate.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIStyledItemDelegate.h	(revision 55133)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIStyledItemDelegate.h	(revision 55134)
@@ -28,8 +28,20 @@
     Q_OBJECT;
 
+signals:
+
+    /** Notifies listeners about
+      * created editor's Enter/Return key triggering. */
+    void sigEditorEnterKeyTriggered();
+
 public:
 
     /** Constructor. */
-    QIStyledItemDelegate(QObject *pParent) : QStyledItemDelegate(pParent) {}
+    QIStyledItemDelegate(QObject *pParent)
+        : QStyledItemDelegate(pParent)
+        , m_fWatchForEditorEnterKeyTriggering(false)
+    {}
+
+    /** Defines whether QIStyledItemDelegate should watch for the created editor's Enter/Return key triggering. */
+    void setWatchForEditorEnterKeyTriggering(bool fWatch) { m_fWatchForEditorEnterKeyTriggering = fWatch; }
 
 private:
@@ -37,13 +49,19 @@
     /** Returns the widget used to edit the item specified by @a index for editing.
       * The @a pParent widget and style @a option are used to control how the editor widget appears.
-      * Besides Qt description copy-pasted above we are installing the hook to redirect editor's sigCommitData signal. */
+      * Besides that, we are installing the hooks to redirect editor's sigCommitData and sigEnterKeyTriggered signals. */
     QWidget* createEditor(QWidget *pParent, const QStyleOptionViewItem &option, const QModelIndex &index) const
     {
         /* Call to base-class to get actual editor created: */
         QWidget *pEditor = QStyledItemDelegate::createEditor(pParent, option, index);
-        /* All the stuff we actually need from QIStyledItemDelegate is to redirect this one signal: */
+        /* All the stuff we actually need from QIStyledItemDelegate is to redirect these signals: */
         connect(pEditor, SIGNAL(sigCommitData(QWidget*)), this, SIGNAL(commitData(QWidget*)));
+        if (m_fWatchForEditorEnterKeyTriggering)
+            connect(pEditor, SIGNAL(sigEnterKeyTriggered()), this, SIGNAL(sigEditorEnterKeyTriggered()));
         /* Return actual editor: */
         return pEditor;
     }
+
+    /** Holds whether QIStyledItemDelegate should watch
+      * for the created editor's Enter/Return key triggering. */
+    bool m_fWatchForEditorEnterKeyTriggering;
 };
