2

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?

Mattia
  • 133
  • 2
  • 8

1 Answers1

0

For knowledge, I tried Qt 5.11.0 (beta) and this version resolve the problem.

eyllanesc
  • 235,170
  • 19
  • 170
  • 241
Mattia
  • 133
  • 2
  • 8