agateau / mup

A markup previewer
Other
39 stars 3 forks source link

disable context menu #11

Closed CedricCabessa closed 8 years ago

CedricCabessa commented 8 years ago

The context menu proposed by default is broken:

A proper context menu can be implemented later but in the meantime, it is better to disable it.

This patch use shameless monkey patching

agateau-g commented 8 years ago

Indeed the default context menu is not good. But that monkey patching is a lot of violence! :)

It should not be too much work to create a better context menu. I think it's a matter of calling setContextMenuPolicy(Qt::CustomContextMenu), connect to the customContextMenuRequested() signal, then create a menu filled with actions obtained from QWebView::pageAction(). If you feel like doing it... otherwise I'll get to it, but don't know when.