本页内容

QAccessibilityHints Class

QAccessibilityHints 类包含特定于平台的辅助功能提示和设置。更多内容...

头文件: #include <QAccessibilityHints>
CMake: find_package(Qt6 REQUIRED COMPONENTS Gui)
target_link_libraries(mytarget PRIVATE Qt6::Gui)
qmake: QT += gui
自: Qt 6.10
继承自: QObject

属性

公共函数

Qt::ContrastPreference contrastPreference() const
Qt::MotionPreference motionPreference() const

信号

void contrastPreferenceChanged(Qt::ContrastPreference contrastPreference)
void motionPreferenceChanged(Qt::MotionPreference motionPreference)

重新实现的受保护函数

virtual bool event(QEvent *event) override

详细说明

该类将特定于平台的辅助功能设置整合在一起,可通过 `QStyleHints::accessibility` 进行访问。

另请参阅 QStyleHints 。

属性文档

[read-only, since 6.10] contrastPreference : Qt::ContrastPreference

该属性保存了系统设置的对比度模式。

应用程序可使用此属性来确定系统当前使用的对比度设置。

Qt 样式使用此属性来调整调色板颜色和轮廓。

该枚举在 Qt 6.10 中引入。

访问函数:

Qt::ContrastPreference contrastPreference() const

通知器信号:

void contrastPreferenceChanged(Qt::ContrastPreference contrastPreference)

另请参阅 Qt::ColorScheme 、QGuiApplication::palette() 以及QEvent::PaletteChange 。

[read-only, since 6.12] motionPreference : Qt::MotionPreference

该属性存储了系统设置的运动偏好。

应用程序可利用此属性来判断用户界面是否应减少动画效果。遵循此偏好设置,可使患有前庭运动障碍的用户更易于使用该应用程序。

该枚举在 Qt 6.12 中引入。

访问函数:

Qt::MotionPreference motionPreference() const

通知信号:

void motionPreferenceChanged(Qt::MotionPreference motionPreference)

另请参阅 contrastPreference 。

成员函数文档

[override virtual protected] bool QAccessibilityHints::event(QEvent *event)

重写了:QObject::event(QEvent *e)。

© 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.