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

Context menu

Tags: None
(comma "," separated)
lballesteros
Registered Member
Posts
24
Karma
0

Context menu

Mon Oct 22, 2012 7:05 am
Hi, I want to create my own context menu with some diferent QActions to the predefined context menu.
I've create my QActions and add them to my mapwidget like I do in a normal widget, then I've set the context menu policy, but when I do click with the right button appears the predefined context menu.
It's posible to create my own context menu in Marble? How can I do this?
Thanks for your help.
User avatar
Earthwings
KDE Developer
Posts
172
Karma
1
OS

Re: Context menu  Topic is solved

Thu Oct 25, 2012 7:35 am
The measure tool plugin and the routing layer should be good starting points to see how to extend the existing context menu.

To completely remove the existing context menu, call
Code: Select all
setMouseButtonPopupEnabled( Qt::RightButton, false )
on the default input handler (available via MarbleWidget::inputHandler()).
lballesteros
Registered Member
Posts
24
Karma
0

Re: Context menu

Mon Oct 29, 2012 7:53 am
Thanks!! it's just what I needed


Bookmarks



Who is online

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