Context menu inside the view

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
carlopav
Posts: 197
Joined: Mon Dec 31, 2018 1:49 pm

Context menu inside the view

Postby carlopav » Tue Aug 13, 2019 7:02 pm

Hello, i was wondering if anyone have any advice on displaying a custom context menu on right click event on the graphic view. Or eventually to temporary add some entries in the standard one.
vocx
Posts: 736
Joined: Thu Oct 18, 2018 9:18 pm

Re: Context menu inside the view

Postby vocx » Wed Aug 14, 2019 2:58 am

carlopav wrote:
Tue Aug 13, 2019 7:02 pm
Hello, i was wondering if anyone have any advice on displaying a custom context menu on right click event on the graphic view. Or eventually to temporary add some entries in the standard one.
I'm not sure I'm understanding you correctly, but the Draft Workbench adds custom items to the right click menu (the context menu) when it loads.

See InitGui.py, line 122. Is this what you are looking for?
carlopav
Posts: 197
Joined: Mon Dec 31, 2018 1:49 pm

Re: Context menu inside the view

Postby carlopav » Wed Aug 14, 2019 7:13 am

Thanks, I think so, I'll give it a deeper look.