我测试了1
上发布的以下代码qml查看器无法打开新窗口,其进度始终为0.1,有什么问题?
import QtQuick 1.0
import QtWebKit 1.0
Grid {
columns: 3
id: pages
height: 300; width: 600
Component {
id: webViewPage
WebView {
id: webView
height: 300; width: 600
newWindowComponent: webViewPage
newWindowParent: pages
url: "newwindows.html"
onLoadStarted: console.log("Started"+url)
onLoadFinished: console.log("Finished"+url)
onLoadFailed: console.log("Failed")
onProgressChanged: console.log(progress)
onUrlChanged: console.log("Changed"+progress+url)
}
}
Loader { sourceComponent: webViewPage }
}
答案 0 :(得分:0)
值得尝试使用Window
元素实际创建一个新窗口,看看你是否有运气。无论数据是否通过,我都希望窗口能够启动。见这里:
http://blog.qt.digia.com/blog/2011/08/26/toplevel-windows-and-menus-with-qt-quick/