Monday, October 26, 2015

error: qtquickcontrolsapplication.h: No such file or directory

If you try to build Qt Creator Examples and reported error of qtquickcontrolsapplication.h: No such file or directory.

Most probably you install Qt with sudo, the default install location is /opt, a user un-writable location. When you build Qt Creator Examples, you have to copy the project to another user writable location, it break the links and lost the shared directory.

May be you have to un-install Qt. Re-install to another user writable location, or re-install WITHOUT sudo (the default location is your HOME). Such that you need not copy the project when create examples.