qmlscene: could not find a Qt installation of ''

qt
└── helloqt.qml

在qt目录下运行helloqt.qml文件时出现这个提示:

$ qmlscene helloqt.qml 
qmlscene: could not find a Qt installation of ''

解决方法:

在home里的.config下建个目录qtchooser:

cd ~/.config
mkdir qtchooser

然后添加default.conf文件,添加qt的bin和lib。即在 ~/.config/qtchooser/default.conf 文件中添加如下内容(注意不要用$HOME这种写法):

/home/jack/Qt5.9.1/5.9.1/gcc_64/bin
/home/jack/Qt5.9.1/5.9.1/gcc_64/lib

--END--

原文地址:https://www.cnblogs.com/ibgo/p/7518021.html