summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorDenis Dzyubenko <denis.dzyubenko@nokia.com>2009-04-27 09:36:15 (GMT)
committerDenis Dzyubenko <denis.dzyubenko@nokia.com>2009-05-11 14:51:57 (GMT)
commitcee4fb7bd327f4b1aaaa7e541328b4fe19b12d1a (patch)
tree0ec23a2c6acb545f0981c9a1594ff9ef1b0a1e46 /examples
parentc0dc85f18230c338187b3a5f0eb1f17d1f570d05 (diff)
downloadQt-cee4fb7bd327f4b1aaaa7e541328b4fe19b12d1a.zip
Qt-cee4fb7bd327f4b1aaaa7e541328b4fe19b12d1a.tar.gz
Qt-cee4fb7bd327f4b1aaaa7e541328b4fe19b12d1a.tar.bz2
Improved finding a scrollable QWebFrame in browser demo.
Diffstat (limited to 'examples')
-rw-r--r--examples/gestures/browser/webview.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/examples/gestures/browser/webview.cpp b/examples/gestures/browser/webview.cpp
index 310c7d8..2eee119 100644
--- a/examples/gestures/browser/webview.cpp
+++ b/examples/gestures/browser/webview.cpp
@@ -329,6 +329,13 @@ void WebView::gestureEvent(QGestureEvent *event)
QWebHitTestResult result = frame->hitTestContent(g->startPos());
if (!result.isNull())
m_currentPanFrame = result.frame();
+ while (m_currentPanFrame &&
+ m_currentPanFrame->scrollBarMinimum(Qt::Vertical) == 0 &&
+ m_currentPanFrame->scrollBarMaximum(Qt::Vertical) == 0 &&
+ m_currentPanFrame->scrollBarMinimum(Qt::Horizontal) == 0 &&
+ m_currentPanFrame->scrollBarMaximum(Qt::Horizontal) == 0) {
+ m_currentPanFrame = m_currentPanFrame->parentFrame();
+ }
}
} else {
}