简体   繁体   中英

Can't run qt commands like qtviewer

I am new to Qt so I follow a tutorial on QML. It starts with a basic qml file which should be run with qmlviewer .

The problem is that when I start qmlviewer it says

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

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.

Thank you

As said in the documentation : 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.

So using qmlscence all works.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM