[Qt-interest] Enable scrollbar in a disabled QWebView?
Stefan Dotterweich
stefandotterweich at gmx.de
Fri Jan 30 10:23:37 CET 2009
Hi,
I am trying to find a way to show a web page but the view should not react to the user clicking on links or wanting to type in a combo box etc.
This is very easy to do by using a QWebView and calling setEnabled(false) on it. However, this way the scroll bar is also disabled and you can't see the whole web page when the QWebView does not have much room.
My application needs this because I want to interpret which elements of the web page a user clicks on (such as a specific DIV or combo box) without actually "using" the web page as in clicking on links.
I thought of a few solutions but so far none of them worked or seemed worth trying:
-As stated before, disabling the QWebView also disables the scroll bar and there seems to be no way to get the scroll bar of a QWebFrame without subclassing QWebFrame and even then you would have to rewrite a lot because the scroll bar is private
-I thought about somehow making a picture of the rendered QWebView and then display the picture in another widget. Unfortunately this seems rather complicated to do and I'm not even sure if it's possible
-I tried using blockSignals() on QWebView, QWebPage and QWebFrame so maybe it would not open a new web page after a link is clicked but it had no effect, either
any help is appreciated
cheers,
Stefan
More information about the Qt-interest-old
mailing list