Tel: urls in Qt Webkit
Is there any way to make the Tel: url in Qt Webkit actually start a phone call?
similar discussion with suggestions here: "http://developer.qt.nokia.com/forums/viewthread/1774":http://developer.qt.nokia.com/forums/viewthread/1774
reimplement QWebPage::acceptNavigationRequest(QWebFrame *frame, const QNetworkRequest &request, QWebPage::NavigationType type) and check for (request.url().scheme() == "tel").
I'm using Qt Webkit via a "QML WebView object":http://doc.qt.nokia.com/4.7-snapshot/qml-webview.html -- is there a moderately painless way of making my own QML WebView that uses a custom subclass of QWebPage? I have looked at the QDeclarativeWebView source and it defines its own QDeclarativeWebPage as a private class. Can I change that without copying the entire rest of the QDeclarativeWebView class?
I don't work with the QML thing so i don't know exactly how to link between QDeclarativeWebView and QML WebView but i did take a look in QDeclarativeWebView[.cpp/_p.h] and here is what i suggest:
1 - webView has more signal than what is documented in Nokia doc (all QDeclarativeWebView signals actually), can you take a quick check to verify if onUrlChanged: popup.show("Ok") show sth if you change your Url?
2 - if 1 is true then you should reimplement QDeclarativeWebView by adding in QDeclarativeWebView_p.h
void phoneNumber(const QString& message) as a signal
then reimplement bool QDeclarativeWebPage::acceptNavigationRequest ( QWebFrame * frame, const QNetworkRequest & request, NavigationType type ) by adding sth like
if (request.url().scheme() == “tel”)
3 - make phone call on onPhoneNumber(string) returns by WebView.
Hope it would help.
This post is deleted!