[QTBUG-26330]QML WebView resizing and redraw bug?
-
Well, that's it! This is the problem... I am using preferredWidth and preferredHeight - you see what it does. There are few others problems that I have discovered:
I wanted to create a new type of QGraphicsWebView as mentioned me somebody here, but I have discovered bug:
"QDeclarativeView bug ... [QTBUG 25999]":http://qt-project.org/forums/viewreply/87502Well, I was tryin' how to force repaint the app, but it looks like you can't in QML do that...
"Forcing Repaint ":http://lists.qt.nokia.com/pipermail/qt-qml/2010-August/000961.html -
I think the google classic page won't work. Try some dynamic page like the mobile login page.
I think google.com doesn't resize for me either -
Well, here I am and voi lá...I have found the black sheep of QtQuick - Flickable element - WebView as child of Flickable after resizing DOES NOT redraw it's own content...
// EDIT:
No, the problem resists in WebView. Pushing bug. -
If anyone is interested in at least having a quick fix, you can disable the WebView's rendering during the resize by using a timer.
My fix looked a bit like this:
@Item {
id: rootonWidthChanged: renderingTimer.restart();
onHeightChanged: renderingTimer.restart();Timer {
id: renderingTimer;
onRunningChanged: webView.renderingEnabled = !running;
interval: 100;
}WebView {
id: webView
preferredWidth: root.width
preferredHeight: root.height
}
}@With the item object placed inside a Flickable.
If you have a better fix, don't hesitate to correct me.