Switch off scrollbars when in dragToScroll mode
They don't work with dragging, anyway since flicking and scrollbars operate in different directions.
This commit is contained in:
parent
547231f381
commit
6de3205490
@ -179,6 +179,14 @@ QWebFrame *WebView::mainFrame() const
|
||||
|
||||
void WebView::setDragToScroll(bool drag)
|
||||
{
|
||||
// enable / disable scrollbars
|
||||
if (drag) {
|
||||
mainFrame()->setScrollBarPolicy(Qt::Horizontal, Qt::ScrollBarAlwaysOff);
|
||||
mainFrame()->setScrollBarPolicy(Qt::Vertical, Qt::ScrollBarAlwaysOff);
|
||||
} else {
|
||||
mainFrame()->setScrollBarPolicy(Qt::Horizontal, Qt::ScrollBarAsNeeded);
|
||||
mainFrame()->setScrollBarPolicy(Qt::Vertical, Qt::ScrollBarAsNeeded);
|
||||
}
|
||||
d->webView->setDragToScroll(drag);
|
||||
d->scrollWidget->setFiltersChildEvents(drag);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user