You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On Reddit we've been asked how to create a custom context menu with NiceGUI. Theoretically, it should be possible to use QMenu's context-menu and touch-position props:
We need to activate the parent event (see Remove no-parent-event prop for ui.menu #713). As a workaround we can remove the no-parent-event prop: ui.menu().props(..., remove='no-parent-event').
We need to deactivate the loopback. As a workaround we can write ui.menu.LOOPBACK = False.
Description
On Reddit we've been asked how to create a custom context menu with NiceGUI. Theoretically, it should be possible to use QMenu's
context-menu
andtouch-position
props:But this does not work for two reasons:
no-parent-event
prop:ui.menu().props(..., remove='no-parent-event')
.ui.menu.LOOPBACK = False
.To simplify the API, we want to
ui.menu
, andAs an alternative workaround one can simply use
ui.element('q-menu')
(without value events and binding):The text was updated successfully, but these errors were encountered: