Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. [Solved] QtWebView on ios confusion
QtWS25 Last Chance

[Solved] QtWebView on ios confusion

Scheduled Pinned Locked Moved Mobile and Embedded
5 Posts 2 Posters 2.3k Views
  • 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.
  • clogwogC Offline
    clogwogC Offline
    clogwog
    wrote on last edited by
    #1

    from a few places i read that a non native UIWebView browsers are not allowed on ios by apple, but on
    http://qt-project.org/forums/viewthread/43920
    i read that QtWebView is available for ios.

    when i run a @import QtQuick 2.4
    import QtQuick.Controls 1.3
    import QtWebKit 1.0

    Item {

    width: 300
    height: 300
    
    WebView {
         id: test
         anchors.fill: parent
         width: parent.width
         height: parent.height
         smooth: true
         url: "http://qt-project.org"
     
     }
    

    }@

    on the ios simulator and on my device i get a
    @qrc:/Webview.qml:4:1: module "QtWebKit" is not installed@

    what should i be able to expect on Qt 5.4 for ios ?

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      The name is a bit confusing…
      Anyway, you are currently using QtWebKit and it's WebView element and not QtWebView which is what you are looking for

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • clogwogC Offline
        clogwogC Offline
        clogwog
        wrote on last edited by
        #3

        i'm still confused then.

        is: http://doc.qt.io/qt-5/qml-qtwebkit-webview.html
        the right one that should work on ios ?

        if i use @import QtWebKit 3.0@ as per documentation
        and leave the rest the same, i still see the problem of
        @qrc:/Webview.qml:3:1: module "QtWebKit" is not installed@

        is there something else i would need to change or is it just my environment, and it should work ?

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Don't use QtWebKit on iOS or Android for that matter.

          See the "mini browser example":https://qt.gitorious.org/qt/qtwebview/source/examples/webview/minibrowser/ from the QtWebView repository

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • clogwogC Offline
            clogwogC Offline
            clogwog
            wrote on last edited by
            #5

            thank you ! the example made it all good :)

            especially

            @#ifdef QT_WEBVIEW_WEBENGINE_BACKEND
            #include <QtWebEngine>
            #endif // QT_WEBVIEW_WEBENGINE_BACKEND
            @
            and

            @#ifdef QT_WEBVIEW_WEBENGINE_BACKEND
            QtWebEngine::initialize();
            #endif // QT_WEBVIEW_WEBENGINE_BACKEND
            @

            in the main, and

            @qtHaveModule(webengine) {
            QT += webengine
            DEFINES += QT_WEBVIEW_WEBENGINE_BACKEND
            }@

            in the .pro file

            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