2
내가 QML의 웹보기
import QtQuick 1.1
import QtWebKit 1.0
import com.nokia.meego 1.0
Page
{
id: mainPage
Flickable
{
id: appFlickable
anchors.fill: parent
clip: true
contentHeight: appView.height
contentWidth: appView.width
WebView
{
id: appView
preferredHeight: parent.height
preferredWidth: parent.width
url: appUrl
settings.javascriptCanOpenWindows: true
settings.javascriptEnabled: true
settings.autoLoadImages: true
settings.javascriptCanAccessClipboard: true
settings.developerExtrasEnabled: true
onLoadFailed: console.log("load failed")
onLoadFinished: console.log("load finished")
}
}
}
를 사용하여 로컬 페이지 (웹 OS 응용 프로그램)을 열려고
내가 MAIN.CPP이 방법으로로드 실패 이유를 찾는 방법 :
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QDeclarativeView view;
view.rootContext()->setContextProperty("appUrl", argv[1]);
view.setSource(QUrl("qrc:/qml/main.qml"));
view.showFullScreen();
return app.exec();
}
을
항상로드가 실패합니다. 문제를 발견 할 수있는 방법이 있습니까, 일부 웹 콘솔에서 실패한 것을 표시 할 수있게 할 수 있습니까?
감사
마르신 네트워크 오류 (도달 할 수없는 또는 잘못된 URL 등)에서 호출