Registered Member
|
Hi, I need to know the mouse's geographic position when I click with the rigth button. I tried it with: QPoint p = marbleWidget->popupMenu()->mousePosition(); but I've some errors when I use this line in my code. Is there another way to know the position? Thanks.
|
Administrator
|
Could you please post the precise compile/other error messages you are seeing or encountering?
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
Registered Member
|
The problem is that I can't access to marbleWidget's popupMenu because I don't have any header for this class... Then when I put this line in my code the cmpiler throws the following error message:
sm_c.cpp:608: error: invalid use of incomplete type 'struct Marble::MarbleWidgetPopupMenu' ..\..\..\..\apps\Qt\4.7.4\include/marble/MarbleWidget.h:47: error: forward declaration of 'struct Marble::MarbleWidgetPopupMenu' Maybe it could be a stupid question, but I'm a bit new in c++ programming |
Administrator
|
Indeed, you need the header src/lib/MarbleWidgetPopupMenu.h from Marble's sources. It seems that it is not exported in any case, so I do not know if you would be able to use it even if the header were installed.
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
Registered Member
|
I've exported the header in my project's includes path, but it still not works. I don't have any error when I compile now, but it seems like the function doesn't exits because the IDE don´t recognize it like a marbleWidget's function.
|
Registered users: Bing [Bot], claydoh, Google [Bot], rblackwell