Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. WebView on OS X
Forum Updated to NodeBB v4.3 + New Features

WebView on OS X

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
5 Posts 3 Posters 1.6k Views 2 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.
  • D Offline
    D Offline
    drakebp
    wrote on last edited by
    #1

    I have been trying to use QtWebView 1.0 in qml on os x 10.11. I have qt 5.5.1.

    import QtQuick 2.5
    import QtQuick.Window 2.2
    import QtWebView 1.0
    
    Window {
        visible: true
        height:1024
        width: 768
    
        WebView {
            id: web
            anchors.fill: parent
            url: "https://www.google.com"
        }
    }
    

    My screen shows up as white blank empty page. I am wondering if this bug: Qtbug 46792 is my actual problem. I am really interested in the webview as my app runs on most desktop platforms, android and ios(webview would allow me to not have my app rejected in apple app store). My question is have other people experienced this problem and if so what have you done for workaround? I think I have 2 options, wait for it to get fixed(which I can't tell when that will happen) or use webview for all platforms but os x and try another web framework qt provides. Any ideas would be most helpful. Thanks!

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mcosta
      wrote on last edited by
      #2

      Hi,

      as far as I know, in Qt 5.5.x WebView is implemented as a wrapper of QtWebEngine; so you need to initialize WebEngine in main.cpp

      QtWebEngine::initialize()
      

      I suggest to have a look to the Minibrowser Example code

      Once your problem is solved don't forget to:

      • Mark the thread as SOLVED using the Topic Tool menu
      • Vote up the answer(s) that helped you to solve the issue

      You can embed images using (http://imgur.com/) or (http://postimage.org/)

      1 Reply Last reply
      0
      • D Offline
        D Offline
        drakebp
        wrote on last edited by
        #3

        Thanks for the response. I thought WebView didn't use chromium underneath but instead native where it could and webkit for anywhere else? I know I can't use qtwebengine as I do need to submit to the apple app store. I did try the initialize but didn't change anything.

        1 Reply Last reply
        0
        • M Offline
          M Offline
          mcosta
          wrote on last edited by mcosta
          #4

          There was a plan to implement WebView in native code for OS X (as is now for Android and iOS) but I don't know about the current implementation.

          I suggest to contact the qt developers (mailing list or IRC)

          Once your problem is solved don't forget to:

          • Mark the thread as SOLVED using the Topic Tool menu
          • Vote up the answer(s) that helped you to solve the issue

          You can embed images using (http://imgur.com/) or (http://postimage.org/)

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

            Hi,

            It's the QtWebView module that offers a wrapper around OS X, iOS and Android web views.

            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

            • Login

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