Ubuntu QT安装qt快速控件2.1 [英] Ubuntu QT install qt quick controls 2.1

查看:47
本文介绍了Ubuntu QT安装qt快速控件2.1的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 Qt 5.7.0 应用程序.当我运行我的应用程序时,它没有启动,并且有一条终端消息说:

I have a Qt 5.7.0 application. When I run my application it does not start and there is a terminal message saying:

QQmlApplicationEngine failed to load component
qrc:/main.qml:2 module "QtQuick.Controls" version 2.1 is not installed

我该如何解决这个问题?

How can I solve this issue?

谢谢!!

推荐答案

正如你从 Qt Quick Controls 2 文档的版本"部分,如果您使用的是 Qt 5.7,则必须导入 Quick Controls 2.0 版,不是 2.1 版快速控制.

As you can see from the "Versions" section of the Qt Quick Controls 2 documentation, you have to import version 2.0 of Quick Controls if you're using Qt 5.7, not version 2.1 of Quick Controls.

或者,您可以更新到最新版本的 Qt (5.9),然后您可以使用 Quick Controls 2.1.

Alternatively, you could update to the latest version of Qt (5.9), and then you can use Quick Controls 2.1.

这篇关于Ubuntu QT安装qt快速控件2.1的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆