1

I want to hide the Reload option from the default context menu of Qt webenginepage. I have already removed other options such as Save page and View source doing this :

WebPage::WebPage(QObject *parent) :
    QWebEnginePage(parent)
{
    action(QWebEnginePage::SavePage)->setVisible(false);
    action(QWebEnginePage::ViewSource)->setVisible(false);
    connect(QWebEngineProfile::defaultProfile(), &QWebEngineProfile::downloadRequested, this, &WebPage::startDownload);
}

So I try to do the same for the Reload option like this :

action(QWebEnginePage::Reload)->setVisible(false);

But it doesn't work this time, any idea ?

0 Answers0