Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Modifying QWebView's copy behaviour



  • Hello! I currently have a QWebView, everything is working correctly except the copy behaviour: when the user copy anything from the webview, some selected images should be processed into keywords and the rest should be formatted to plain text.

    So I figured out I would do something like getting the action that copies the selection and link it to something else, like:

    @QAction* act = view->pageAction(QWebPage::Copy);
    act->disconnect();
    connect(act, SIGNAL(triggered()), this, SLOT(copy()));@

    However, the QAction* that pageAction returns seems to be constant, so I guess I can't go that way.. So how else could I do this?


Log in to reply