Index: trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIAdvancedSlider.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIAdvancedSlider.cpp	(revision 46479)
+++ trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIAdvancedSlider.cpp	(revision 46496)
@@ -44,5 +44,8 @@
       , m_minErr(-1)
       , m_maxErr(-1)
-    {}
+    {
+        /* Make sure ticks *always* positioned below: */
+        setTickPosition(QSlider::TicksBelow);
+    }
 
     int positionForValue(int val) const
@@ -66,14 +69,24 @@
         QSize s = size();
 
+        /* We want to acquire SC_SliderTickmarks sub-control rectangle
+         * and fill it with necessary background colors: */
+#ifdef Q_WS_MAC
+        /* Under MacOS X SC_SliderTickmarks is not fully reliable
+         * source of the information we need, providing us with incorrect width.
+         * So we have to calculate tickmarks rectangle ourself: */
         QRect ticks = style()->subControlRect(QStyle::CC_Slider, &opt, QStyle::SC_SliderTickmarks, this);
-#ifdef Q_WS_MAC
         ticks.setRect((s.width() - available) / 2, s.height() - ticks.y(), available, ticks.height());
 #else /* Q_WS_MAC */
-        if (ticks.isNull() || ticks.isEmpty())
-        {
-            ticks = style()->subControlRect(QStyle::CC_Slider, &opt, QStyle::SC_SliderHandle, this) | style()->subControlRect(QStyle::CC_Slider, &opt, QStyle::SC_SliderGroove, this);
-            ticks.setRect((s.width() - available) / 2, ticks.bottom() + 1, available, s.height() - ticks.bottom() - 1);
-        }
+        /* Under Windows SC_SliderTickmarks is fully unreliable
+         * source of the information we need, providing us with empty rectangle.
+         * Under X11 SC_SliderTickmarks is not fully reliable
+         * source of the information we need, providing us with different rectangles
+         * (correct or incorrect) under different look&feel styles.
+         * So we have to calculate tickmarks rectangle ourself: */
+        QRect ticks = style()->subControlRect(QStyle::CC_Slider, &opt, QStyle::SC_SliderHandle, this) |
+                      style()->subControlRect(QStyle::CC_Slider, &opt, QStyle::SC_SliderGroove, this);
+        ticks.setRect((s.width() - available) / 2, ticks.bottom() + 1, available, s.height() - ticks.bottom() - 1);
 #endif /* Q_WS_MAC */
+
         if ((m_minOpt != -1 &&
              m_maxOpt != -1) &&
@@ -189,14 +202,4 @@
 }
 
-void QIAdvancedSlider::setTickPosition(QSlider::TickPosition fPos)
-{
-    m_pSlider->setTickPosition(fPos);
-}
-
-QSlider::TickPosition QIAdvancedSlider::tickPosition() const
-{
-    return m_pSlider->tickPosition();
-}
-
 Qt::Orientation QIAdvancedSlider::orientation() const
 {
Index: trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIAdvancedSlider.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIAdvancedSlider.h	(revision 46479)
+++ trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIAdvancedSlider.h	(revision 46496)
@@ -53,7 +53,4 @@
     int tickInterval() const;
 
-    void setTickPosition(QSlider::TickPosition fPos);
-    QSlider::TickPosition tickPosition() const;
-
     Qt::Orientation orientation() const;
 
Index: trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic2.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic2.cpp	(revision 46479)
+++ trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic2.cpp	(revision 46496)
@@ -65,5 +65,4 @@
                 m_pRamSlider->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
                 m_pRamSlider->setOrientation(Qt::Horizontal);
-                m_pRamSlider->setTickPosition(QSlider::TicksBelow);
             }
             m_pRamEditor = new QILineEdit(this);
Index: trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageExpert.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageExpert.cpp	(revision 46479)
+++ trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageExpert.cpp	(revision 46496)
@@ -64,5 +64,4 @@
                     m_pRamSlider->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
                     m_pRamSlider->setOrientation(Qt::Horizontal);
-                    m_pRamSlider->setTickPosition(QSlider::TicksBelow);
                     m_pRamSlider->setValue(m_pNameAndSystemEditor->type().GetRecommendedRAM());
                 }
