Hi,

i am porting the UI of my cacheme application to qml. Most things somehow work, 
some even nicely (making map overlays
is a snap) and some are rather tricky (a nice file selector). But there is one 
thing i can't figure out how to do correctly:

I have a widget which is a ggraphicsgeomap. This widget of course needs to 
interface to various things like the
gps. My original plain qt had a global instance of my locationProvider class 
and i connected this to a slot in my mapwidget instance.

But how do i do that with qml in between? My main.cpp contains an instance of 
my locationProvider, so i need a connect
my custom widget with the instance only known to my main function. I think one 
step is to register my locationProvider with the
declarative view:

  LocationProvider locationProvider;
  view.rootContext()->setContextProperty("LocationProvider", &locationProvider);

in my qml part i create an instance of my map class  (my map is registered in 
c++ via 
qmlRegisterType<MapWidget>("MapWidget", 1, 0, "Map"), so the widget is created 
this way:

 Map {
   id: map
 }

Now the question: How do i connect a signal from my locationProvider with a 
slot of my map?

Regards,
  Till
_______________________________________________
Qt-qml mailing list
[email protected]
http://lists.qt.nokia.com/mailman/listinfo/qt-qml

Reply via email to