Index: /trunk/src/VBox/Frontends/VirtualBox/src/extensions/QITableView.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/extensions/QITableView.cpp	(revision 64228)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/extensions/QITableView.cpp	(revision 64229)
@@ -20,4 +20,7 @@
 #else  /* !VBOX_WITH_PRECOMPILED_HEADERS */
 
+/* Qt includes: */
+# include <QAccessibleWidget>
+
 /* GUI includes: */
 # include "QITableView.h"
@@ -29,4 +32,91 @@
 #endif /* !VBOX_WITH_PRECOMPILED_HEADERS */
 
+
+/** QAccessibleWidget extension used as an accessibility interface for QITableView. */
+class QIAccessibilityInterfaceForQITableView : public QAccessibleWidget
+{
+public:
+
+    /** Returns an accessibility interface for passed @a strClassname and @a pObject. */
+    static QAccessibleInterface *pFactory(const QString &strClassname, QObject *pObject)
+    {
+        /* Creating QITableView accessibility interface: */
+        if (pObject && strClassname == QLatin1String("QITableView"))
+            return new QIAccessibilityInterfaceForQITableView(qobject_cast<QWidget*>(pObject));
+
+        /* Null by default: */
+        return 0;
+    }
+
+    /** Constructs an accessibility interface passing @a pWidget to the base-class. */
+    QIAccessibilityInterfaceForQITableView(QWidget *pWidget)
+        : QAccessibleWidget(pWidget, QAccessible::List)
+    {}
+
+    /** Returns the number of children. */
+    virtual int childCount() const /* override */;
+    /** Returns the child with the passed @a iIndex. */
+    virtual QAccessibleInterface *child(int iIndex) const /* override */;
+    /** Returns the index of the passed @a pChild. */
+    virtual int indexOfChild(const QAccessibleInterface *pChild) const /* override */;
+
+    /** Returns a text for the passed @a enmTextRole. */
+    virtual QString text(QAccessible::Text enmTextRole) const /* override */;
+
+private:
+
+    /** Returns corresponding QITableView. */
+    QITableView *table() const { return qobject_cast<QITableView*>(widget()); }
+};
+
+
+/*********************************************************************************************************************************
+*   Class QIAccessibilityInterfaceForQITableView implementation.                                                                 *
+*********************************************************************************************************************************/
+
+int QIAccessibilityInterfaceForQITableView::childCount() const
+{
+    /* Make sure table still alive: */
+    AssertPtrReturn(table(), 0);
+
+    /* Return the number of children: */
+    return table()->childCount();
+}
+
+QAccessibleInterface *QIAccessibilityInterfaceForQITableView::child(int iIndex) const
+{
+    /* Make sure table still alive: */
+    AssertPtrReturn(table(), 0);
+    /* Make sure index is valid: */
+    AssertReturn(iIndex >= 0 && iIndex < childCount(), 0);
+
+    /* Return the child with the passed iIndex: */
+    return QAccessible::queryAccessibleInterface(table()->childItem(iIndex));
+}
+
+int QIAccessibilityInterfaceForQITableView::indexOfChild(const QAccessibleInterface *pChild) const
+{
+    /* Search for corresponding child: */
+    for (int i = 0; i < childCount(); ++i)
+        if (child(i) == pChild)
+            return i;
+
+    /* -1 by default: */
+    return -1;
+}
+
+QString QIAccessibilityInterfaceForQITableView::text(QAccessible::Text /* enmTextRole */) const
+{
+    /* Make sure table still alive: */
+    AssertPtrReturn(table(), QString());
+
+    /* Return tree whats-this: */
+    return table()->whatsThis();
+}
+
+
+/*********************************************************************************************************************************
+*   Class QITableView implementation.                                                                                            *
+*********************************************************************************************************************************/
 
 QITableView::QITableView(QWidget *pParent)
@@ -79,4 +169,7 @@
 void QITableView::prepare()
 {
+    /* Install QITableView accessibility interface factory: */
+    QAccessible::installFactory(QIAccessibilityInterfaceForQITableView::pFactory);
+
     /* Delete old delegate: */
     delete itemDelegate();
