![]() |
How to compile Qt location example ?
How can I compile the following example?
running these commands does not do it: qmake -project qmake make http://wiki.forum.nokia.com/index.ph...cation_Example |
Re: How to compile Qt location example ?
I didn't check the example, but I suppose there is a .pro file already so you don't need to run "qmake -project". Try running:
qmake <filename>.pro make Replace <filename> with the actual name of the .pro file. |
Re: How to compile Qt location example ?
Unfortunately, there isn't. The example consists of a single C file containing GTK+ code. :( I would also really like to know how to get the location info in a Qt application.
|
Re: How to compile Qt location example ?
tmsha,
you can build the sample as follow. gcc main.c `pkg-config --cflags --libs gtk+-2.0 hildon-1 liblocation` |
Re: How to compile Qt location example ?
|
Re: How to compile Qt location example ?
Hi,
Quote:
And I've requested a better documentation on the example's page itself, and It will be improved soon. Daniel |
Re: How to compile Qt location example ?
Quote:
I have no experience with glib/GTK+ coding. Here are some pointers as to what could be improved:
As I said, I was able to solve all of these problems. But it also meant that I spent a weekend implementing a feature that could have taken just a few hours at most. |
Re: How to compile Qt location example ?
Quote:
Daniel |
Re: How to compile Qt location example ?
Quote:
I just need to get some gps coordinates from time to time. |
Re: How to compile Qt location example ?
Well, I figured it out also. I guess there was no documentation because it was so simple.
Liblocation (and any glib libs, as far as I understood) will run fine inside the Qt event loop. You basically just use the library as you would in a Gtk application. |
Re: How to compile Qt location example ?
Hi,
just a small hint. Since the thread started there have been some news. So you could have a look at the QtMobility project for getting the location as well. There is a first tech preview in extras-devel. It is not ready yet, but definitely worth to have a look! Daniel |
Re: How to compile Qt location example ?
Quote:
thanks |
Re: How to compile Qt location example ?
Quote:
I am trying to use location API in a very simple Python QT application but it ends up with a segmentation fault. The code is actually modified from the version using gobject main loop. It seems that the code crashes (on N900) when I call control.start(). The code can not be obviously tested on scratchbox because there is no GPS available. Any ideas what is wrong? -- JariM Code:
import sys |
Re: How to compile Qt location example ?
@multisil: Have you been able to fix your problem with the segmentation fault?
Greetings, bartenst |
Re: How to compile Qt location example ?
Quote:
So my main.py would be (I suppose you have a simple QT Designer created UI file my_ui.py with one button (myBtn) and text label (msgLabel)): Code:
import sys Code:
import os |
Re: How to compile Qt location example ?
@multisil: Thanks a lot for your posting - it helps me a lot! :)
|
Re: How to compile Qt location example ?
@multisil: Thanks, it works... but the Segmentation fault comes anyway
I have taken your GPSConnection class unchanged, and initialised it in the way you have done it in the second file. My stripped down application window has a single QListWidget and opens QMessageBox on demand. The application works flawlessly unless I allow start of GPSConnection thread, only start, NO data manipulations. Within a minute or two of using QListWidget and QMessageBox there comes SIGSEGV. Sorry it does not work in my case, but thanks anyway for the idea and sort of working example. |
All times are GMT. The time now is 11:07. |
vBulletin® Version 3.8.8