qt.labs.handlers 未找到

qt.labs.handlers not found

我是第一次尝试使用 qml 处理程序。 导入 Qt.labs.handlers 1.0 不工作

我的 Qt 版本是 5.13.0 MingW32/64。在 windows 10.

上使用

错误快照 1

qt.labs 个已识别模块的快照

正如 docs 指出的那样:

In Qt 5.10, these handlers were introduced in a separate Qt.labs.handlers module. Now they are included with Qt Quick since 5.12. The pre-existing Keys attached property is similar in concept, so we refer to the pointing-device-oriented handlers plus Keys together as the set of Input Handlers. We expect to offer more attached-property use cases in future versions of Qt.

(强调我的)

所以在 Qt 5.13 中不再需要导入模块 Qt.labs.handlers 1.0 因为它已经被移动到模块 QtQuick 2.13.