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

how to create my own context menu on marbleWidget

Tags: None
(comma "," separated)
shiguoliang
Registered Member
Posts
2
Karma
0
instead of using its default right mouse menu on the map,
i want to define my own menu ,
how to do it?
thanks for any help. :)
User avatar
Earthwings
KDE Developer
Posts
172
Karma
1
OS
If you want to extend the current menu with custom actions, you can use MarbleWidget::popupMenu() and MarbleWidgetPopupMenu::addAction(). To disable the menu completely, use MarbleWidget::inputHandler() and MarbleInputHandler::setMouseButtonPopupEnabled(). Showing a custom context menu could be hooked to the rmbRequest(int x, int y) signal of MarbleInputHandler.


Bookmarks



Who is online

Registered users: Bing [Bot], daret, Google [Bot], Sogou [Bot]