QAccessibleEvent 类

The QAccessibleEvent class is used to query addition accessibility information about complex widgets. 更多...

头: #include <QAccessibleEvent>
继承: QEvent

公共函数

QAccessibleEvent (Type type , int child )
int child () const
void setValue (const QString & text )
QString value () const

额外继承成员

详细描述

The QAccessibleEvent class is used to query addition accessibility information about complex widgets.

The event can be of type QEvent::AccessibilityDescription or QEvent::AccessibilityHelp .

某些 QAccessibleInterface implementations send QAccessibleEvents to the widget they wrap to obtain the description or help text of a widget or of its children. The widget can answer by calling setValue () with the requested information.

默认 QWidget::event () implementation simply sets the text to be the widget's tooltip (对于 AccessibilityDescription event) or its "What's This?" text (对于 AccessibilityHelp event).

成员函数文档编制

QAccessibleEvent:: QAccessibleEvent ( Type type , int child )

Constructs an accessibility event of the given type , which must be QEvent::AccessibilityDescription or QEvent::AccessibilityHelp .

child is the (1-based) index of the child to which the request applies. If child is 0, the request is for the widget itself.

另请参阅 child ().

int QAccessibleEvent:: child () const

Returns the (1-based) index of the child to which the request applies. If the child is 0, the request is for the widget itself.

void QAccessibleEvent:: setValue (const QString & text )

Set the description or help text for the given child () 到 text , thereby answering the request.

另请参阅 value ().

QString QAccessibleEvent:: value () const

Returns the text set using setValue ().

另请参阅 setValue ().