Reply to topic

Right click mouse position

lballesteros
Registered Member
Posts
24
Karma
0

Right click mouse position

Fri Nov 16, 2012 11:00 am
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.
User avatar bcooksley
Administrator
Posts
18657
Karma
83
OS

Re: Right click mouse position

Tue Nov 20, 2012 6:11 am
Could you please post the precise compile/other error messages you are seeing or encountering?


System Settings and Device Actions KCM maintainer
Image
lballesteros
Registered Member
Posts
24
Karma
0

Re: Right click mouse position

Tue Nov 20, 2012 8:03 am
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
User avatar bcooksley
Administrator
Posts
18657
Karma
83
OS

Re: Right click mouse position

Tue Nov 20, 2012 8:08 am
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.


System Settings and Device Actions KCM maintainer
Image
lballesteros
Registered Member
Posts
24
Karma
0

Re: Right click mouse position

Tue Nov 20, 2012 9:30 am
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.

 
Reply to topic

Bookmarks



Who is online

Registered users: afiestas, arojas, avishekk, Baidu [Spider], Bing [Bot], bjoernbalazs, Cris70, edmael, epsi1on, Exabot [Bot], ggael, Google [Bot], google01103, Hans, ivan, jgrulich, joshaughnessy, jstaniek, koriun, La Ninje, Majestic-12 [Bot], MSNbot Media, ooker, scummos, sinclair, Sogou [Bot], TheraHedwig, Tioz, Yahoo [Bot]