I'd like to add context menus for widgets on my form.
As I know to do that I should reimplement Widget::contextMenuEvent(QContextMenuEvent*) function.
But how can I reimplement it if widget is created in Qt Creator (designer)?
@EDIT
Ok, I found out I can do it by this way:But is there any way to set context menu for only one lineedit?Qt Code:
(...) menu->exec(event->globalPos()); }To copy to clipboard, switch view to plain text mode
Bookmarks