Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt WebKit
  4. Tel: urls in Qt Webkit
Forum Updated to NodeBB v4.3 + New Features

Tel: urls in Qt Webkit

Scheduled Pinned Locked Moved Qt WebKit
5 Posts 3 Posters 3.3k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Q Offline
    Q Offline
    QtQueries
    wrote on last edited by
    #1

    Hi

    Is there any way to make the Tel: url in Qt Webkit actually start a phone call?

    Thanks

    1 Reply Last reply
    0
    • ? This user is from outside of this forum
      ? This user is from outside of this forum
      Guest
      wrote on last edited by
      #2

      similar discussion with suggestions here: "http://developer.qt.nokia.com/forums/viewthread/1774":http://developer.qt.nokia.com/forums/viewthread/1774

      1 Reply Last reply
      0
      • I Offline
        I Offline
        Insalien
        wrote on last edited by
        #3

        reimplement QWebPage::acceptNavigationRequest(QWebFrame *frame, const QNetworkRequest &request, QWebPage::NavigationType type) and check for (request.url().scheme() == "tel").

        1 Reply Last reply
        0
        • Q Offline
          Q Offline
          QtQueries
          wrote on last edited by
          #4

          Hi Creep.

          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?

          Thanks

          1 Reply Last reply
          0
          • I Offline
            I Offline
            Insalien
            wrote on last edited by
            #5

            hi,

            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”)
            emit viewItem()->phoneNumber(xxx);
            3 - make phone call on onPhoneNumber(string) returns by WebView.

            Hope it would help.

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved