Index: /trunk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIFormEditorWidget.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIFormEditorWidget.cpp	(revision 78142)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIFormEditorWidget.cpp	(revision 78143)
@@ -18,4 +18,5 @@
 /* Qt includes: */
 #include <QComboBox>
+#include <QEvent>
 #include <QHeaderView>
 #include <QItemEditorFactory>
@@ -563,4 +564,29 @@
     /// @todo add some check..
     m_pTableModel->setFormValues(comForm.GetValues());
+    adjustTable();
+}
+
+bool UIFormEditorWidget::eventFilter(QObject *pObject, QEvent *pEvent)
+{
+    /* Process events for table only: */
+    if (pObject != m_pTableView)
+        return QWidget::eventFilter(pObject, pEvent);
+
+    /* Process different event-types: */
+    switch (pEvent->type())
+    {
+        case QEvent::Show:
+        case QEvent::Resize:
+        {
+            /* Adjust table: */
+            adjustTable();
+            break;
+        }
+        default:
+            break;
+    }
+
+    /* Call to base-class: */
+    return QWidget::eventFilter(pObject, pEvent);
 }
 
@@ -571,4 +597,6 @@
     if (pLayout)
     {
+        pLayout->setContentsMargins(0, 0, 0, 0);
+
         /* Create view: */
         m_pTableView = new UIFormEditorView(this);
@@ -579,4 +607,5 @@
             m_pTableView->verticalHeader()->setDefaultSectionSize((int)(m_pTableView->verticalHeader()->minimumSectionSize() * 1.33));
             m_pTableView->setSelectionMode(QAbstractItemView::SingleSelection);
+            m_pTableView->installEventFilter(this);
 
             /* Create model: */
@@ -614,4 +643,28 @@
 }
 
+void UIFormEditorWidget::adjustTable()
+{
+    m_pTableView->horizontalHeader()->setStretchLastSection(false);
+    /* If table is NOT empty: */
+    if (m_pTableModel->rowCount())
+    {
+        /* Resize table to contents size-hint and emit a spare place for first column: */
+        m_pTableView->resizeColumnsToContents();
+        const int iFullWidth = m_pTableView->viewport()->width();
+        const int iNameWidth = m_pTableView->horizontalHeader()->sectionSize(UIFormEditorDataType_Name);
+        const int iValueWidth = qMax(0, iFullWidth - iNameWidth);
+        m_pTableView->horizontalHeader()->resizeSection(UIFormEditorDataType_Value, iValueWidth);
+    }
+    /* If table is empty: */
+    else
+    {
+        /* Resize table columns to be equal in size: */
+        const int iFullWidth = m_pTableView->viewport()->width();
+        m_pTableView->horizontalHeader()->resizeSection(UIFormEditorDataType_Name, iFullWidth / 2);
+        m_pTableView->horizontalHeader()->resizeSection(UIFormEditorDataType_Value, iFullWidth / 2);
+    }
+    m_pTableView->horizontalHeader()->setStretchLastSection(true);
+}
+
 
 #include "UIFormEditorWidget.moc"
Index: /trunk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIFormEditorWidget.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIFormEditorWidget.h	(revision 78142)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIFormEditorWidget.h	(revision 78143)
@@ -70,8 +70,16 @@
     void setVirtualSystemDescriptionForm(const CVirtualSystemDescriptionForm &comForm);
 
+protected:
+
+    /** Preprocesses any Qt @a pEvent for passed @a pObject. */
+    virtual bool eventFilter(QObject *pObject, QEvent *pEvent) /* override */;
+
 private:
 
     /** Prepares all. */
     void prepare();
+
+    /** Adjusts table column sizes. */
+    void adjustTable();
 
     /** Holds the table-view instance. */
