开发者

How to remove vertical slider from QWebView that displays GoogleMap with current location?

I want to remove the Vertical slider from QWebView that displays GoogleMap with current location details.

My QWebView size is Width:342 and Height:501.

In JavaScript I have mentioned the following:

<div id="map" style="width: 320px; height: 490px">

How ever when I run the application on Nokia N97, I got the map but height of the map is too large. As a result I got the slider along with the Blank screen below t开发者_StackOverflow中文版he Map.

Even I tried by decreasing the height of QWebview from 501 to 300 and height of the map from 490px to 300px, but in both cases I am getting the blank screen.

How is it possible to remove that blank screen so that to remove the Slider on the screen with the mentioned size.

Thanks in advance....


It's not quite as straight forward as you would think. Just use something like the following in the constructor of your widget.

QWebView* view = new QWebView;

// Set the page contents here...

QWebFrame* frame = view->page()->mainFrame();
frame->setScrollBarPolicy( Qt::Vertical, Qt::ScrollBarAlwaysOff );
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜