I have a problem with QWebEngineView in Qt 5.10.1. When i Right-Clicking on "input" fields in page, "Paste" action not shown in context menu.
This is my code on contextMenuEvent:
void WebView::contextMenuEvent(QContextMenuEvent *event)
{
QMenu *menu = page()->createStandardContextMenu();
const QList<QAction*> actions = menu->actions();
auto it = std::find(actions.cbegin(), actions.cend(), page()->action(QWebEnginePage::ViewSource));
if (it != actions.cend()) {
(*it)->setVisible(false);
}
menu->popup(event->globalPos());
}
createStandardContextMenu() it work correctly in some situation, for example if i select a text, context menu show "Copy" or "Unselect" actions correctly.
Anyone know anything about it?