本页内容

QAccessibleViewportInterface Class

QAccessibleViewportInterface 类实现了对视口的支持。更多内容...

头文件: #include <QAccessibleViewportInterface>
CMake: find_package(Qt6 REQUIRED COMPONENTS Gui)
target_link_libraries(mytarget PRIVATE Qt6::Gui)
qmake: QT += gui
自: Qt 6.12
状态: 技术预览

该类处于技术预览阶段,内容可能会有变动。

公共函数

QAccessibleViewportInterface()
virtual ~QAccessibleViewportInterface()
virtual QSizeF contentSize() const = 0
virtual bool isIndexed() const = 0
virtual QPointF position() const = 0
virtual void setPosition(QPointF position) = 0
virtual QSizeF viewportSize() const = 0

详细说明

此接口应由允许二维或索引视口(例如通过滚动)的无障碍对象实现。例如列表或可轻扫视图。

成员函数文档

[constexpr noexcept default] QAccessibleViewportInterface::QAccessibleViewportInterface()

默认构造一个QAccessibleViewportInterface 的实例。

[virtual noexcept] QAccessibleViewportInterface::~QAccessibleViewportInterface()

销毁QAccessibleViewportInterface 。

[pure virtual] QSizeF QAccessibleViewportInterface::contentSize() const

返回内容的总大小(绝对值)。对于未分页的视口,此方法将返回底层内容的绝对大小;对于已分页的视口,则返回行数和列数。

[pure virtual] bool QAccessibleViewportInterface::isIndexed() const

如果底层内容是索引结构(例如项目列表),则返回 true。

[pure virtual] QPointF QAccessibleViewportInterface::position() const

返回视口内当前位置的归一化值。

另请参阅 ` setPosition()`。

[pure virtual] void QAccessibleViewportInterface::setPosition(QPointF position)

将视口的位置设置为给定的position (以归一化值定义)。

另请参阅 position()。

[pure virtual] QSizeF QAccessibleViewportInterface::viewportSize() 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.