Index: /trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserItemGroup.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserItemGroup.cpp	(revision 75180)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserItemGroup.cpp	(revision 75181)
@@ -58,5 +58,4 @@
     , m_pExitButton(0)
     , m_pNameEditorWidget(0)
-    , m_pNameEditor(0)
 {
     /* Prepare: */
@@ -90,5 +89,4 @@
     , m_pExitButton(0)
     , m_pNameEditorWidget(0)
-    , m_pNameEditor(0)
 {
     /* Prepare: */
@@ -125,5 +123,4 @@
     , m_pExitButton(0)
     , m_pNameEditorWidget(0)
-    , m_pNameEditor(0)
 {
     /* Prepare: */
@@ -171,5 +168,4 @@
     , m_pExitButton(0)
     , m_pNameEditorWidget(0)
-    , m_pNameEditor(0)
 {
     /* Prepare: */
@@ -389,7 +385,19 @@
         return;
 
-    /* Unlock name-editor: */
-    m_pNameEditor->show();
+    /* Assign name-editor text: */
     m_pNameEditorWidget->setText(name());
+
+    /* Layout name-editor: */
+    const int iMargin = data(GroupItemData_VerticalMargin).toInt();
+    const int iHeaderHeight = 2 * iMargin + m_minimumHeaderSize.height();
+    const QSize headerSize = QSize(geometry().width(), iHeaderHeight);
+    const QGraphicsView *pView = model()->scene()->views().first();
+    const QPoint viewPoint = pView->mapFromScene(geometry().topLeft().toPoint());
+    const QPoint globalPoint = pView->parentWidget()->mapToGlobal(viewPoint);
+    m_pNameEditorWidget->move(globalPoint);
+    m_pNameEditorWidget->resize(headerSize);
+
+    /* Show name-editor: */
+    m_pNameEditorWidget->show();
     m_pNameEditorWidget->setFocus();
 }
@@ -812,17 +820,4 @@
                                 iVerticalMargin + (iFullHeaderHeight - iEnterButtonHeight) / 2;
             m_pEnterButton->setPos(iEnterButtonX, iEnterButtonY);
-        }
-
-        /* Name-editor: */
-        if (m_pNameEditor && m_pNameEditorWidget)
-        {
-            /* Prepare variables: */
-            int iHeaderSpacing = data(GroupItemData_HeaderSpacing).toInt();
-            int iToggleButtonWidth = m_toggleButtonSize.width();
-            /* Layout name-editor: */
-            int iNameEditorX = iHorizontalMargin + iToggleButtonWidth + iHeaderSpacing;
-            int iNameEditorY = 1;
-            m_pNameEditor->setPos(iNameEditorX, iNameEditorY);
-            m_pNameEditorWidget->resize((int)(geometry().width() - iNameEditorX - iHorizontalMargin), m_pNameEditorWidget->height());
         }
 
@@ -1106,6 +1101,6 @@
         return;
 
-    /* Lock name-editor: */
-    m_pNameEditor->hide();
+    /* Close name-editor: */
+    m_pNameEditorWidget->close();
 
     /* Enumerate all the group names: */
@@ -1226,11 +1221,8 @@
 
         /* Setup name-editor: */
-        m_pNameEditorWidget = new UIEditorGroupRename(name(), this);
+        m_pNameEditorWidget = new UIEditorGroupRename(name());
         m_pNameEditorWidget->setFont(m_nameFont);
         connect(m_pNameEditorWidget, &UIEditorGroupRename::sigEditingFinished,
                 this, &UIChooserItemGroup::sltNameEditingFinished);
-        m_pNameEditor = new QGraphicsProxyWidget(this);
-        m_pNameEditor->setWidget(m_pNameEditorWidget);
-        m_pNameEditor->hide();
     }
     /* Items except main root: */
@@ -1879,8 +1871,7 @@
 *********************************************************************************************************************************/
 
-UIEditorGroupRename::UIEditorGroupRename(const QString &strName, UIChooserItem *pParent)
-    : m_pParent(pParent)
+UIEditorGroupRename::UIEditorGroupRename(const QString &strName)
+    : QWidget(0, Qt::Popup)
     , m_pLineEdit(0)
-    , m_pTemporaryMenu(0)
 {
     /* Create layout: */
@@ -1895,4 +1886,6 @@
         if (m_pLineEdit)
         {
+            setFocusProxy(m_pLineEdit);
+            m_pLineEdit->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored);
             m_pLineEdit->setTextMargins(0, 0, 0, 0);
             connect(m_pLineEdit, &QLineEdit::returnPressed,
@@ -1903,7 +1896,9 @@
         pLayout->addWidget(m_pLineEdit);
     }
-
-    /* Install event-filter: */
-    m_pLineEdit->installEventFilter(this);
+}
+
+QString UIEditorGroupRename::text() const
+{
+    return m_pLineEdit->text();
 }
 
@@ -1911,9 +1906,4 @@
 {
     m_pLineEdit->setText(strText);
-}
-
-QString UIEditorGroupRename::text() const
-{
-    return m_pLineEdit->text();
 }
 
@@ -1923,66 +1913,2 @@
     m_pLineEdit->setFont(font);
 }
-
-void UIEditorGroupRename::setFocus()
-{
-    m_pLineEdit->setFocus();
-}
-
-bool UIEditorGroupRename::eventFilter(QObject *pWatched, QEvent *pEvent)
-{
-    /* Process only events sent to line-edit: */
-    if (pWatched != m_pLineEdit)
-        return QWidget::eventFilter(pWatched, pEvent);
-
-    /* Handle events: */
-    switch (pEvent->type())
-    {
-        case QEvent::ContextMenu:
-        {
-            /* Handle context-menu event: */
-            handleContextMenuEvent(static_cast<QContextMenuEvent*>(pEvent));
-            /* Filter out this event: */
-            return true;
-        }
-        case QEvent::FocusOut:
-        {
-            if (!m_pTemporaryMenu)
-                emit sigEditingFinished();
-            break;
-        }
-        default:
-            break;
-    }
-
-    /* Call to base-class: */
-    return QWidget::eventFilter(pWatched, pEvent);
-}
-
-void UIEditorGroupRename::handleContextMenuEvent(QContextMenuEvent *pContextMenuEvent)
-{
-    /* Prepare variables: */
-    QGraphicsView *pView = m_pParent->model()->scene()->views().first();
-
-    /* Create context-menu: */
-    m_pTemporaryMenu = new QMenu(pView);
-    QMenu *pMenu = m_pLineEdit->createStandardContextMenu();
-    const QList<QAction*> &actions = pMenu->actions();
-    foreach (QAction *pAction, actions)
-        m_pTemporaryMenu->addAction(pAction);
-
-    /* Determine global position: */
-    QPoint subItemPos = pContextMenuEvent->pos();
-    QPoint itemPos = mapToParent(subItemPos);
-    QPointF scenePos = m_pParent->mapToScene(itemPos);
-    QPoint viewPos = pView->mapFromScene(scenePos);
-    QPoint globalPos = pView->mapToGlobal(viewPos);
-
-    /* Show context menu: */
-    m_pTemporaryMenu->exec(globalPos);
-
-    /* Delete context menu: */
-    delete m_pTemporaryMenu;
-    m_pTemporaryMenu = 0;
-    delete pMenu;
-}
-
Index: /trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserItemGroup.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserItemGroup.h	(revision 75180)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserItemGroup.h	(revision 75181)
@@ -28,7 +28,5 @@
 
 /* Forward declarations: */
-class QGraphicsProxyWidget;
 class QGraphicsScene;
-class QLineEdit;
 class QMenu;
 class QMimeData;
@@ -346,7 +344,5 @@
 
         /** Holds the group name editor instance. */
-        UIEditorGroupRename  *m_pNameEditorWidget;
-        /** Holds the group name editor proxy instance. */
-        QGraphicsProxyWidget *m_pNameEditor;
+        UIEditorGroupRename *m_pNameEditorWidget;
     /** @} */
 
@@ -410,37 +406,19 @@
 public:
 
-    /** Constructs group editor with initial @a strName passing @a pParent to the base-class. */
-    UIEditorGroupRename(const QString &strName, UIChooserItem *pParent);
-
+    /** Constructs group editor with initial @a strName. */
+    UIEditorGroupRename(const QString &strName);
+
+    /** Returns editor text. */
+    QString text() const;
     /** Defines editor @a strText. */
     void setText(const QString &strText);
-    /** Returns editor text. */
-    QString text() const;
 
     /** Defines editor @a font. */
     void setFont(const QFont &font);
 
-public slots:
-
-    /** ACquires keyboard focus. */
-    void setFocus();
-
-protected:
-
-    /** Preprocesses any Qt @a pEvent for passed @a pObject. */
-    virtual bool eventFilter(QObject *pObject, QEvent *pEvent) /* override */;
-
 private:
-
-    /** Handles context-menu @a pEvent. */
-    void handleContextMenuEvent(QContextMenuEvent *pEvent);
-
-    /** Holds the parent reference. */
-    UIChooserItem *m_pParent;
 
     /** Holds the line-edit instance. */
     QLineEdit *m_pLineEdit;
-    /** Holds the conect-menu instance. */
-    QMenu     *m_pTemporaryMenu;
 };
 
