本页内容

变更内容Qt Test

Qt 6 中的变更,源于我们有意识地努力,旨在使该框架更高效、更易于使用。

我们力求在每个版本中保持所有公共 API 的二进制和源代码兼容性。但为了使 Qt 成为更好的框架,某些变更在所难免。

在本主题中,我们将总结Qt Test 中的这些变更,并提供处理这些变更的指导。

QTouchEventSequence 类

QTest::QTouchEventSequence 中,所有接受QWidget 参数的函数已移至新类:QTest::QTouchEventWidgetSequence 。受影响的函数列表如下:

同样地,接受QWidget 参数的QTest::touchEvent() 重载方法已修改为返回一个 QTouchEventWidgetSequence 对象。

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