XmlListModel on url with self signed cert, and QtWebKit OS X issue
-
Hi,
I was just checking out Qt Quick and I find it really interesting. Nevertheless, I bumped into few problems and would appreciate some clarification:
-
I'm trying to get XML via XmlListModel from server that has self signed certification for https protocol, and it seems like that's a dead end. Is there a way to debug XmlListModel responses? If self signed https is the problem here, I wonder if I can force it to accept all certificates?
-
I was trying to "import QtWebKit 1.0" but the console tells me
module "QtWebKit" is not installed
Is Qt 4.7 libraries missing QtWebKit module on OS X? If so, how can I install them?
Thanks,
-Jesse
-
-
[quote author="JesseOnRails" date="1285784340"]Is there a way to debug XmlListModel responses?[/quote]
There is an errorString() function that should be able to give at least some information about the error (assuming it is a network error). You can use it like this:
@onStatusChaged: if (status == XmlListModel.Error) console.log(errorString())@
[quote author="JesseOnRails" date="1285784340"]Is Qt 4.7 libraries missing QtWebKit module on OS X? If so, how can I install them?[/quote]
They should not be missing. Have you done a source build, or installed either the Qt binaries or the Qt SDK binaries? If it is the SDK, you might be hitting "this problem":http://bugreports.qt.nokia.com/browse/QTBUG-13888.
Regards,
Michael -
Thank you for your quick response!
[quote author="mbrasser" date="1285802530"]
@onStatusChaged: if (status == XmlListModel.Error) console.log(errorString())@
[/quote]Thanks, the problem seems to be SSL handshake as I assumed: error is: "SSL handshake failed" is there a way to force acceptance of self signed (aka untrusted) certificates?
[quote author="mbrasser" date="1285802530"]
They should not be missing. Have you done a source build, or installed either the Qt binaries or the Qt SDK binaries? If it is the SDK, you might be hitting "this problem":http://bugreports.qt.nokia.com/browse/QTBUG-13888.Regards,
Michael
[/quote]I Installed Qt binaries which have dev tools etc included.. This seems a bit odd that in demos-program demos that use QtWebKit work just fine.. Any clues what to do?
-Jesse
-
[quote author="JesseOnRails" date="1285842947"]Thanks, the problem seems to be SSL handshake as I assumed: error is: "SSL handshake failed" is there a way to force acceptance of self signed (aka untrusted) certificates?[/quote]
I'm not very familiar with the network side of things. I think you would be able to achieve this with a custom QNetworkAccessManager (see docs for "QDeclarativeNetworkAccessManagerFactory":http://doc.qt.nokia.com/4.7/qdeclarativenetworkaccessmanagerfactory.html), though others might know of a better solution.
[quote]I Installed Qt binaries which have dev tools etc included.. This seems a bit odd that in demos-program demos that use QtWebKit work just fine.. Any clues what to do?[/quote]
Do you have a /Developer/Applications/Qt/imports/ directory? What are it's contents?
-
[quote author="mbrasser" date="1285897921"]
I'm not very familiar with the network side of things. I think you would be able to achieve this with a custom QNetworkAccessManager (see docs for "QDeclarativeNetworkAccessManagerFactory":http://doc.qt.nokia.com/4.7/qdeclarativenetworkaccessmanagerfactory.html), though others might know of a better solution.
[/quote]I'll check that out, thanks.
[quote author="mbrasser" date="1285897921"]
Do you have a /Developer/Applications/Qt/imports/ directory? What are it's contents?
[/quote]ls /Developer/Applications/Qt/imports/
Qt org -
"2. I was trying to “import QtWebKit 1.0” but the console tells me "
I'm not sure(never tried) but I think that qt 4.7 has webkit 2 . Am I wrong?
EDIT: never mind. is QtWebKit 1.0. works on my side. I checked this "example":http://doc.qt.nokia.com/4.7/declarative-modelviews-webview-alerts-qml.html and works great. I have the qt sdk ( qt4.7 and qt creator 2.01)
-
Mine is the same, QT 4.7.0 (64 bit) and Qt Creator 2.0.1.
But the example gives out the same error.. There must be something missing from this installation or something.. maybe I should reinstall and see if it helps. But seems odd that installer would fail to do proper installation at random.
-
Yup.. reinstall didn't resolve it.
-
[quote author="JesseOnRails" date="1286006941"]>ls /Developer/Applications/Qt/imports/
>Qt org
[/quote]Okay, it looks like this has "old" contents (there should be a QtWebKit rather than an org) -- I've added a note to "QTBUG-13888":http://bugreports.qt.nokia.com/browse/QTBUG-13888.
Regards,
Michael