PDA

View Full Version : Hide "Reload" in QWebView



JediMaster
28th May 2013, 11:19
Hi friends,

Is there anybody know how to hide or disable the "Reload" button in the QWebView, I tried


setContextMenuPolicy(Qt::NoContextMenu);

and


page()->action(QWebPage::NavigationTypeReload)->setVisible(false);


But neither of two ways work in my Qt 4.7.1, so please help me, thanks a lot !

RafalNiewinski
29th May 2013, 20:29
You can connect a context menu request signal to your own function and in this function does not do anything or add only what you want.


connect(webView, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(contextMenuRequest(QPoint)));