[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 -
So bug persists even on using preferredWidth and preferredHeight?
-
Yes, persists. I will push it as a bug, I think...
-
That's weird since I'm doing this thing in my app without problem. It resizes for me. I'm using it on the google oAuth login page
-
Well, I will try it again - well, now it's in Flickable element, so I will try not to use that parent element... I will say results after I will try that.
-
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 -
Hmm... so the solution is to make some additional JavaScript... I want to make google useable for everyone...and it would be disaster if it wouldn't work...
/EDIT:
but wait, I have mentioned it don't work on any website... I am confused... -
I'm confused too :P
-
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.