Index: /trunk/src/VBox/Frontends/VirtualBox4/include/VBoxSelectorWnd.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox4/include/VBoxSelectorWnd.h	(revision 7307)
+++ /trunk/src/VBox/Frontends/VirtualBox4/include/VBoxSelectorWnd.h	(revision 7308)
@@ -24,15 +24,6 @@
 #include "VBoxGlobal.h"
 
-#include <qapplication.h>
+/* Qt includes */
 #include <QMainWindow>
-#include <q3listbox.h>
-#include <q3groupbox.h>
-#include <qaction.h>
-
-#include <q3valuelist.h>
-//Added by qt3to4:
-#include <QEvent>
-#include <QLabel>
-#include <Q3PopupMenu>
 
 class VBoxVMListBox;
@@ -42,8 +33,8 @@
 class VBoxVMLogViewer;
 
-class QLabel;
-class Q3TextBrowser;
 class QTabWidget;
-struct QUuid;
+class Q3ListBoxItem;
+class QEvent;
+class QUuid;
 
 class VBoxSelectorWnd : public QMainWindow
@@ -54,5 +45,5 @@
 
     VBoxSelectorWnd (VBoxSelectorWnd **aSelf,
-                     QWidget* aParent = 0, const char* aName = 0,
+                     QWidget* aParent = 0,
                      Qt::WFlags aFlags = Qt::WType_TopLevel);
     virtual ~VBoxSelectorWnd();
@@ -114,5 +105,5 @@
 
     /** VM list context menu */
-    Q3PopupMenu *mVMCtxtMenu;
+    QMenu *mVMCtxtMenu;
 
     /* actions */
@@ -141,6 +132,4 @@
     VBoxVMDescriptionPage *vmDescriptionPage;
 
-    Q3ValueList <CSession> sessions;
-
     QPoint normal_pos;
     QSize normal_size;
Index: /trunk/src/VBox/Frontends/VirtualBox4/include/VBoxToolBar.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox4/include/VBoxToolBar.h	(revision 7307)
+++ /trunk/src/VBox/Frontends/VirtualBox4/include/VBoxToolBar.h	(revision 7308)
@@ -37,6 +37,6 @@
 public:
 
-    VBoxToolBar (QMainWindow *aMainWindow, QWidget *aParent)
-        : QToolBar (aParent),
+    VBoxToolBar (QMainWindow *aMainWindow, QWidget *aParent = NULL)
+        : QToolBar (aParent), 
           mMainWindow (aMainWindow)
     {
@@ -54,18 +54,24 @@
     void setUsesBigPixmaps (bool enable)
     {
-        QSize bigSize(32, 32);
-
+        QSize size (32, 32);
+        if (!enable)
+            size = QSize (16, 16);
+                
         if (mMainWindow)
-            mMainWindow->setIconSize (bigSize);
+            mMainWindow->setIconSize (size);
         else
-            setIconSize (bigSize);
+            setIconSize (size);
     }
 
     void setUsesTextLabel (bool enable)
     {
+        Qt::ToolButtonStyle tbs = Qt::ToolButtonTextUnderIcon;
+        if (!enable)
+            tbs = Qt::ToolButtonIconOnly;
+            
         if (mMainWindow)
-            mMainWindow->setToolButtonStyle (Qt::ToolButtonTextUnderIcon);
+            mMainWindow->setToolButtonStyle (tbs);
         else
-            setToolButtonStyle (Qt::ToolButtonTextUnderIcon);
+            setToolButtonStyle (tbs);
     }
 
Index: /trunk/src/VBox/Frontends/VirtualBox4/src/VBoxGlobal.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox4/src/VBoxGlobal.cpp	(revision 7307)
+++ /trunk/src/VBox/Frontends/VirtualBox4/src/VBoxGlobal.cpp	(revision 7308)
@@ -863,5 +863,5 @@
          *  from the below constructor or from constructors/methods it calls.
          */
-        VBoxSelectorWnd *w = new VBoxSelectorWnd (&mSelectorWnd, 0, "selectorWnd");
+        VBoxSelectorWnd *w = new VBoxSelectorWnd (&mSelectorWnd, 0);
         Assert (w == mSelectorWnd);
         NOREF(w);
Index: /trunk/src/VBox/Frontends/VirtualBox4/src/VBoxSelectorWnd.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox4/src/VBoxSelectorWnd.cpp	(revision 7307)
+++ /trunk/src/VBox/Frontends/VirtualBox4/src/VBoxSelectorWnd.cpp	(revision 7308)
@@ -30,32 +30,15 @@
 #include "VBoxVMLogViewer.h"
 
-#include <qlabel.h>
-#include <QTextBrowser>
-#include <q3textbrowser.h>
-#include <qmenubar.h>
-#include <q3popupmenu.h>
-#include <qmessagebox.h>
-#include <qwidget.h>
-#include <qtabwidget.h>
-#include <q3widgetstack.h>
-#include <qpushbutton.h>
-#include <q3process.h>
-
-#include <qlayout.h>
-#include <q3vbox.h>
-//Added by qt3to4:
-#include <QDesktopWidget>
-#include <Q3HBoxLayout>
-#include <Q3Frame>
-#include <q3mimefactory.h>
-#include <QResizeEvent>
-#include <QEvent>
-#include <Q3VBoxLayout>
-#include <QMenuItem>
-
 #ifdef Q_WS_X11
 #include <iprt/env.h>
 #endif
 
+/* Qt includes */
+#include <QTextBrowser>
+#include <QMenuBar>
+#include <QMenu>
+#include <QMenuItem>
+#include <QStackedWidget>
+#include <QDesktopWidget>
 
 // VBoxVMDetailsView class
@@ -66,5 +49,5 @@
  *  and another one for inaccessibility errors.
  */
-class VBoxVMDetailsView : public Q3WidgetStack
+class VBoxVMDetailsView : public QStackedWidget
 {
     Q_OBJECT
@@ -72,5 +55,5 @@
 public:
 
-    VBoxVMDetailsView (QWidget *aParent, const char *aName,
+    VBoxVMDetailsView (QWidget *aParent,
                        QAction *aRefreshAction = NULL);
 
@@ -80,5 +63,5 @@
     {
         mDetailsText->setText (aText);
-        raiseWidget (0);
+        setCurrentIndex (0);
     }
 
@@ -87,5 +70,5 @@
         createErrPage();
         mErrText->setText (aText);
-        raiseWidget (1);
+        setCurrentIndex (1);
     }
 
@@ -93,5 +76,5 @@
     {
         mDetailsText->setText (QString::null);
-        raiseWidget (0);
+        setCurrentIndex (0);
     }
 
@@ -120,12 +103,12 @@
     QWidget *mErrBox;
     QLabel *mErrLabel;
-    Q3TextBrowser *mErrText;
+    QTextBrowser *mErrText;
     QToolButton *mRefreshButton;
     QAction *mRefreshAction;
 };
 
-VBoxVMDetailsView::VBoxVMDetailsView (QWidget *aParent, const char *aName,
+VBoxVMDetailsView::VBoxVMDetailsView (QWidget *aParent,
                                       QAction *aRefreshAction /* = NULL */)
-    : Q3WidgetStack (aParent, aName)
+    : QStackedWidget (aParent)
     , mErrBox (NULL), mErrLabel (NULL), mErrText (NULL)
     , mRefreshButton (NULL)
@@ -150,5 +133,5 @@
             this, SLOT (gotLinkClicked (const QUrl &)));
 
-    addWidget (mDetailsText, 0);
+    addWidget (mDetailsText);
 }
 
@@ -162,16 +145,16 @@
     mErrBox = new QWidget();
 
-    Q3VBoxLayout *layout = new Q3VBoxLayout (mErrBox);
-    layout->setSpacing (10);
+    QVBoxLayout *pVLayout = new QVBoxLayout (mErrBox);
+    pVLayout->setSpacing (10);
 
     mErrLabel = new QLabel (mErrBox);
     mErrLabel->setAlignment (Qt::WordBreak);
     mErrLabel->setSizePolicy (QSizePolicy::Expanding, QSizePolicy::Fixed);
-    layout->add (mErrLabel);
-
-    mErrText = new Q3TextBrowser (mErrBox);
+    pVLayout->add (mErrLabel);
+
+    mErrText = new QTextBrowser (mErrBox);
     mErrText->setFocusPolicy (Qt::StrongFocus);
-    mErrText->setLinkUnderline (false);
-    layout->add (mErrText);
+    mErrText->document()->setDefaultStyleSheet ("a { text-decoration: none; }");
+    pVLayout->add (mErrText);
 
     if (mRefreshAction)
@@ -180,8 +163,8 @@
         mRefreshButton->setFocusPolicy (Qt::StrongFocus);
 
-        Q3HBoxLayout *hLayout = new Q3HBoxLayout (layout);
-        hLayout->addItem (new QSpacerItem (0, 0, QSizePolicy::Expanding,
-                                                 QSizePolicy::Minimum));
-        hLayout->add (mRefreshButton);
+        QHBoxLayout *pHLayout = new QHBoxLayout (pVLayout);
+        pHLayout->addItem (new QSpacerItem (0, 0, QSizePolicy::Expanding,
+                                                  QSizePolicy::Minimum));
+        pHLayout->add (mRefreshButton);
 
         connect (mRefreshButton, SIGNAL (clicked()),
@@ -189,8 +172,8 @@
     }
 
-    layout->addItem (new QSpacerItem (0, 0, QSizePolicy::Minimum,
+    pVLayout->addItem (new QSpacerItem (0, 0, QSizePolicy::Minimum,
                                             QSizePolicy::Expanding));
 
-    addWidget (mErrBox, 1);
+    addWidget (mErrBox);
 
     languageChange();
@@ -249,5 +232,5 @@
     VBoxSelectorWnd *mParent;
     QToolButton *mBtnEdit;
-    Q3TextBrowser *mBrowser;
+    QTextBrowser *mBrowser;
     QLabel *mLabel;
 };
@@ -260,12 +243,14 @@
 {
     /* main layout */
-    Q3VBoxLayout *mainLayout = new Q3VBoxLayout (this, 0, 10, "mainLayout");
+    QVBoxLayout *pVMainLayout = new QVBoxLayout (this);
+    pVMainLayout->setSpacing (10);
+    pVMainLayout->setContentsMargins (0, 0, 0, 0);
 
     /* mBrowser */
-    mBrowser = new Q3TextBrowser (this, "mBrowser");
+    mBrowser = new QTextBrowser (this, "mBrowser");
     mBrowser->setSizePolicy (QSizePolicy::Expanding, QSizePolicy::Expanding);
     mBrowser->setFocusPolicy (Qt::StrongFocus);
-    mBrowser->setLinkUnderline (false);
-    mainLayout->addWidget (mBrowser);
+    mBrowser->document()->setDefaultStyleSheet ("a { text-decoration: none; }");
+    pVMainLayout->addWidget (mBrowser);
     /* hidden by default */
     mBrowser->setHidden (true);
@@ -275,13 +260,14 @@
     mLabel->setSizePolicy (QSizePolicy::Expanding, QSizePolicy::Expanding);
     mLabel->setAlignment (Qt::AlignCenter | Qt::WordBreak);
-    mainLayout->addWidget (mLabel);
+    pVMainLayout->addWidget (mLabel);
     /* always disabled */
     mLabel->setEnabled (false);
 
     /* button layout */
-    Q3HBoxLayout *btnLayout = new Q3HBoxLayout (mainLayout, 10, "btnLayout");
-    btnLayout->addItem (new QSpacerItem (0, 0,
-                                         QSizePolicy::Expanding,
-                                         QSizePolicy::Minimum));
+    QHBoxLayout *pHBtnLayout = new QHBoxLayout (pVMainLayout);
+    pHBtnLayout->setSpacing (10);
+    pHBtnLayout->addItem (new QSpacerItem (0, 0,
+                                           QSizePolicy::Expanding,
+                                           QSizePolicy::Minimum));
 
     /* button */
@@ -294,7 +280,7 @@
     mBtnEdit->setUsesTextLabel (true);
     connect (mBtnEdit, SIGNAL (clicked()), this, SLOT (goToSettings()));
-    btnLayout->addWidget (mBtnEdit);
-
-    mainLayout->addItem (new QSpacerItem (0, 0,
+    pHBtnLayout->addWidget (mBtnEdit);
+
+    pVMainLayout->addItem (new QSpacerItem (0, 0,
                                           QSizePolicy::Expanding,
                                           QSizePolicy::Minimum));
@@ -392,5 +378,5 @@
  */
 VBoxSelectorWnd::
-VBoxSelectorWnd (VBoxSelectorWnd **aSelf, QWidget* aParent, const char* aName,
+VBoxSelectorWnd (VBoxSelectorWnd **aSelf, QWidget* aParent,
                  Qt::WFlags aFlags)
     : QMainWindow (aParent, aFlags)
@@ -462,29 +448,34 @@
 
     /* central widget & horizontal layout */
-    setCentralWidget (new QWidget (this, "centralWidget"));
-    Q3HBoxLayout *centralLayout =
-        new Q3HBoxLayout (centralWidget(), 5, 9, "centralLayout");
+    setCentralWidget (new QWidget (this));
+    QHBoxLayout *pCentralLayout =
+        new QHBoxLayout (centralWidget());
+    pCentralLayout->setSpacing (9);
+    pCentralLayout->setContentsMargins (5, 5, 5, 5);
 
     /* left vertical box */
-    Q3VBox *leftVBox = new Q3VBox (centralWidget(), "leftWidget");
-    leftVBox->setSpacing (5);
+    QVBoxLayout *pLeftVLayout = new QVBoxLayout ();
+    pLeftVLayout->setSpacing (5);
     /* right vertical box */
-    Q3VBox *rightVBox = new Q3VBox (centralWidget(), "rightWidget");
-    rightVBox->setSpacing (5);
-    centralLayout->addWidget (leftVBox, 3);
-    centralLayout->addWidget (rightVBox, 5);
+    QVBoxLayout *pRightVLayout = new QVBoxLayout ();
+    pRightVLayout->setSpacing (5);
+    pCentralLayout->addLayout (pLeftVLayout, 3);
+    pCentralLayout->addLayout (pRightVLayout, 3);
 
     /* VM list toolbar */
-    VBoxToolBar *vmTools = new VBoxToolBar (this, leftVBox);
+    VBoxToolBar *vmTools = new VBoxToolBar (this);
+    pLeftVLayout->addWidget(vmTools);
 
     /* VM list box */
-    vmListBox = new VBoxVMListBox (leftVBox, "vmListBox");
+    vmListBox = new VBoxVMListBox ();
+    pLeftVLayout->addWidget (vmListBox);
 
     /* VM tab widget containing details and snapshots tabs */
-    vmTabWidget = new QTabWidget (rightVBox, "vmTabWidget");
+    vmTabWidget = new QTabWidget ();
+    pRightVLayout->addWidget (vmTabWidget);
     vmTabWidget->setMargin (10);
 
     /* VM details view */
-    vmDetailsView = new VBoxVMDetailsView (NULL, "vmDetailsView",
+    vmDetailsView = new VBoxVMDetailsView (NULL,
                                            vmRefreshAction);
     vmTabWidget->addTab (vmDetailsView,
@@ -511,4 +502,6 @@
 //    setUsesTextLabel (true);
 //    setUsesBigPixmaps (true);
+    vmTools->setIconSize (QSize (32, 32));
+    vmTools->setToolButtonStyle (Qt::ToolButtonTextUnderIcon);
     vmTools->setSizePolicy (QSizePolicy::Fixed, QSizePolicy::Preferred);
 
@@ -526,5 +519,5 @@
     /* add actions to menubar */
 
-    Q3PopupMenu *fileMenu = new Q3PopupMenu(this, "fileMenu");
+    QMenu *fileMenu = menuBar()->addMenu(tr("&File"));
     fileDiskMgrAction->addTo( fileMenu );
     fileMenu->insertSeparator();
@@ -535,5 +528,5 @@
     menuBar()->insertItem( QString::null, fileMenu, 1);
 
-    Q3PopupMenu *vmMenu = new Q3PopupMenu (this, "vmMenu");
+    QMenu *vmMenu = menuBar()->addMenu(tr("&Machine"));
     vmNewAction->addTo (vmMenu);
     vmMenu->insertSeparator();
@@ -552,5 +545,5 @@
     menuBar()->insertItem (QString::null, vmMenu, 2);
 
-    mVMCtxtMenu = new Q3PopupMenu (this, "mVMCtxtMenu");
+    mVMCtxtMenu = new QMenu (this);
     vmConfigAction->addTo (mVMCtxtMenu);
     vmDeleteAction->addTo (mVMCtxtMenu);
@@ -565,5 +558,5 @@
     vmShowLogsAction->addTo (mVMCtxtMenu);
 
-    Q3PopupMenu *helpMenu = new Q3PopupMenu( this, "helpMenu" );
+    QMenu *helpMenu = menuBar()->addMenu(tr("&Help"));
     helpContentsAction->addTo (helpMenu);
     helpWebAction->addTo (helpMenu);
