QAccessibleEvent Class

The QAccessibleEvent class is the base class for accessibility notifications. More...

Header: #include <QAccessibleEvent>
qmake: QT += gui
Inherited By:

QAccessibleStateChangeEvent, QAccessibleTableModelChangeEvent, QAccessibleTextCursorEvent, and QAccessibleValueChangeEvent

Public Functions

virtual ~QAccessibleEvent()
virtual QAccessibleInterface *accessibleInterface() const

Detailed Description

This class is used with QAccessible::updateAccessibility().

The event type is one of the values of QAccessible::Event. There are a number of subclasses that should be used to provide more details about the event.

For example to notify about a focus change when re-implementing QWidget::setFocus, the event could be used as follows:


  void MyWidget::setFocus(Qt::FocusReason reason)
  {
      // handle custom focus setting...
      QAccessibleEvent event(f, QAccessible::Focus);
      QAccessible::updateAccessibility(&event);
  }

To enable in process screen readers, all events must be sent after the change has happened.

Member Function Documentation

[virtual] QAccessibleEvent::~QAccessibleEvent()

Destroys the event.

[virtual] QAccessibleInterface *QAccessibleEvent::accessibleInterface() const

Returns the QAccessibleInterface associated with the event.