QtQml: No such file or directory



  • I am using Ubuntu 16.04. I got Qt from APT. I wrote a cpp file that includes <QtQml>, it turned out that g++ can't find this file, while other files like QtGui, QtCore can be found.



  • @fireyyouth Can you check your Qt install's directory with something like find /path/to/qt -iname "*qtqml*" and see if it find it? It's possible the package from apt did not include QML although that seems unlikely.

    You can of course install multiple versions of Qt so you could just install one with the installer (or build one yourself) and that will definitely have QML in it.


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    Did you add the corresponding QT += statements in your .pro file ?


Log in to reply