[英]Can't run qt commands like qtviewer
I am new to Qt so I follow a tutorial on QML. 我是Qt的新手,所以我遵循有关QML的教程。 It starts with a basic qml file which should be run with qmlviewer
. 它从一个基本的qmlviewer
文件开始,该文件应与qmlviewer
一起运行。
The problem is that when I start qmlviewer
it says 问题是当我启动qmlviewer
时说
qmlviewer: could not exec '/usr/lib/qt/bin/qmlviewer': No such file or directory
whereis qmlviewer
tells me that it's location is /usr/bin/qmlviewer
so I try to run it with this absolute path, but I still get the same error whereis qmlviewer
告诉我它的位置是/usr/bin/qmlviewer
所以我尝试使用此绝对路径运行它,但是仍然出现相同的错误
qmlviewer: could not exec '/usr/lib/qt/bin/qmlviewer': No such file or directory
Why is it still looking for that location ? 为什么仍在寻找那个位置? How can I solve this ? 我该如何解决?
I should mention that I have tried qtconfig
just for testing, and I still get the error, so this is a global Qt problem. 我应该提一下,我只是为了测试而尝试了qtconfig
,但仍然收到错误,因此这是一个全局Qt问题。
Thank you 谢谢
As said in the documentation : http://doc.qt.io/qt-5/qtquick-porting-qt5.html 如文档中所述: http : //doc.qt.io/qt-5/qtquick-porting-qt5.html
The qmlviewer tool provided for prototyping and testing QML applications in Qt 4.x has been replaced with the qmlscene tool which integrates with the new scenegraph features in Qt 5. 为Qt 4.x中的QML应用程序原型设计和测试提供的qmlviewer工具已被qmlscene工具所取代,该工具与Qt 5中的新Scenegraph功能集成在一起。
So using qmlscence
all works. 因此,使用qmlscence
可以正常工作。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.