This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Right click mouse position

Tags: None
(comma "," separated)
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
19765
Karma
87
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?


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
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
19765
Karma
87
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.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
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.


Bookmarks



Who is online

Registered users: Bing [Bot], claydoh, Google [Bot], rblackwell