Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to run a sample application in Qt Creator which has an import QtLocation 5.0 statement at the top. I have already installed the Ubuntu SDK.

enter image description here

I searched the software center for qt5location and I see that I have "qtlocation-dev" installed. I don't know if this is the library that I am looking for, but if it is, I don't know what the path to this library is.

What path should I add to the .qmlproject ImportPaths so that I can get QtLocation 5.0 working? If not a path, what do I need to install?

share|improve this question
up vote 3 down vote accepted

You are importing the library correctly, however I suspect you do not have the library installed in your system. You can check if you have the location library installed by running the command below in the terminal.

apt-cache policy qtdeclarative5-qtlocation-plugin

If you do not have it installed, you can install it by,

sudo apt-get install qtdeclarative5-qtlocation-plugin
share|improve this answer
That was it, thanks. Is there a way of figuring out which library exists in which package, so that I can do this myself in the future, or will I have to ask each time? – Mendhak Jul 6 '13 at 22:11
Generally the QML bindings for each Qt module are available in the qtdeclarative5-* packages, so if you can't find the package for a particular module, you can run apt-cache search qtdeclarative5-* on a terminal to see the list of packages available. In the future, Qt Creator should scan through your imports and add or suggest the dependencies for you, but we're not there yet :) – David Planella Jul 8 '13 at 7:07

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.