使用QtQuick.Controls 2.3的ScrollView在QML中找不到库

时间:2017-06-01 13:26:54

标签: qt qml qt5 qtquickcontrols qt5.9

今天我已经更新到Qt 5.9,我正在尝试使用ScrollView,但这需要这个库:import QtQuick.Controls 2.3 当我导入库并运行时,我收到此错误:

  

未安装QtQuick.Controls 2.3。

这是不可能的,因为我安装了最后一个版本qt 5.9

我需要使用import QtQuick.Controls 2.1来滚动android和ios上的内容。

任何解决方案?

1 个答案:

答案 0 :(得分:1)

您链接的文档来自static bool identical_halfstrings(const char *p1, const char *p2) { assert(p1 <= p2); assert(strlen(p1) >= strlen(p2) + (p2 - p1)); while (*p2 != '\0') { if (*p1++ != *p2++) return false; } return true; } 的开发分支 - 这可能会附带Qt5.10,因此导入语句似乎是合法的。

您的错误消息也是正确的,因为QtQuick.Controls 2.3附带QtQuick.Controls 2.2

您的文档链接指出,自Qt5.9以来ScrollView可用 - 此版本的文档也可以找到here - 然后它必须导入已安装的版本Qt5.9

如果这不起作用,我并没有真正看到QtQuick.Controls 2.2优于old-style attatching ScrollBars to Flickables的优势。