このページでは

QAccessibleEvent Class

QAccessibleEvent クラスは、アクセシビリティ通知の基底クラスです。詳細...

ヘッダー: #include <QAccessibleEvent>
CMake: find_package(Qt6 REQUIRED COMPONENTS Gui)
target_link_libraries(mytarget PRIVATE Qt6::Gui)
qmake: QT += gui
継承元:

QAccessibleAnnouncementEvent、QAccessibleStateChangeEvent 、QAccessibleTableModelChangeEvent 、QAccessibleTextCursorEvent 、およびQAccessibleValueChangeEvent

パブリック関数

QAccessibleEvent(QAccessibleInterface *interface, QAccessible::Event type)
QAccessibleEvent(QObject *object, QAccessible::Event type)
virtual ~QAccessibleEvent()
virtual QAccessibleInterface *accessibleInterface() const
int child() const
QObject *object() const
void setChild(int child)
QAccessible::Event type() const

詳細な説明

このクラスは、QAccessible::updateAccessibility() とともに使用されます。

イベントタイプは、QAccessible::Event の値のいずれかです。イベントに関する詳細情報を提供するために使用すべきサブクラスがいくつかあります。

たとえば、QWidget::setFocus を再実装する際にフォーカスの変更を通知するには、このイベントを次のように使用できます。

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

プロセス内のスクリーンリーダーを有効にするには、すべてのイベントは変更が発生した後に送信する必要があります。

メンバ関数のドキュメント

QAccessibleEvent::QAccessibleEvent(QAccessibleInterface *interface, QAccessible::Event type)

interface が変更されたことを通知するためのQAccessibleEventを生成します。イベントtype は、どのような変更があったかを説明します。すでにQAccessibleInterface が存在する場合、またはQObject が存在しない場合は、この関数を使用してください。それ以外の場合は、QObject パラメータを取るオーバーロード関数の使用を検討してください。その方が実行コストが低い可能性があります。

QAccessibleEvent::QAccessibleEvent(QObject *object, QAccessible::Event type)

object が変更されたことを通知するためのQAccessibleEventを生成します。イベントtype は、どのような変更があったかを説明します。

[virtual noexcept] QAccessibleEvent::~QAccessibleEvent()

イベントを削除します。

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

そのイベントに関連付けられたQAccessibleInterface を返します。

int QAccessibleEvent::child() const

子インデックスを返します。

setChild()も参照してください 。

QObject *QAccessibleEvent::object() const

イベントオブジェクトを返します。

void QAccessibleEvent::setChild(int child)

子インデックスをchild に設定します。

child()も参照してください 。

QAccessible::Event QAccessibleEvent::type() const

イベントの種類を返します。

© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.