Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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

1 Answer 1

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
1  
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

 
discard

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.