Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-46713

Qt.openUrlExternally + onNewViewRequest of WebEngineView

    XMLWordPrintable

Details

    • Bug
    • Resolution: Cannot Reproduce
    • P2: Important
    • None
    • 5.10
    • WebEngine
    • None
    • Windows 7, Linux

    Description

      I'm going to use WebEngineView as chat window in my app because there is no simple way to handle animated emoticons in effective way. Using QWebView from Qt Widgets it was possible but now in QML I'm facing with these problems:

      1) I would like to open a particular URL externally. In latest Qt version we have something like "onNewViewRequest" which I used in this way:

      WebEngineView {
          property string currentLink: ""
          onNewViewRequested: Qt.openUrlExternally(currentLink)
          onLinkHovered: currentLink = hoveredUrl
      }
      

      where link is defined as <a href='xxx' target='_blank'></a>

      It crashes almost everytime. I noticed that without using Qt.openUrlExternally it seems to work.

      log:

      [0617/165628:FATAL:gl_bindings_autogen_gl.cc(5046)] Check failed: false. Trying to call glDeleteSync() without current GL context
      Backtrace:
      	QtWebEngineCore::URLRequestCustomJobDelegate::qt_static_metacall [0x0000000182F65536+47159366]
      	QtWebEngineCore::URLRequestCustomJobDelegate::qt_static_metacall [0x0000000182E13C0D+45776669]
      	QtWebEngineCore::URLRequestCustomJobDelegate::qt_static_metacall [0x0000000181A5A6CC+25094620]
      	QtWebEngineCore::URLRequestCustomJobDelegate::qt_static_metacall [0x0000000185BE9FCB+93840091]
      	QtWebEngineCore::URLRequestCustomJobDelegate::qt_static_metacall [0x0000000185BEA0DC+93840364]
      	CertificateErrorController::url [0x00000001801C2266+19142]
      	QtWebEngineCore::CustomUrlSchemeHandler::setScheme [0x00000001801E77F3+38067]
      	QtWebEngineCore::CustomUrlSchemeHandler::setScheme [0x00000001801E2C93+18771]
      	QtWebEngineCore::CustomUrlSchemeHandler::setScheme [0x00000001801E2B91+18513]
      	QtWebEngineCore::CustomUrlSchemeHandler::setScheme [0x00000001801E2C36+18678]
      	QtWebEngineCore::URLRequestCustomJobDelegate::qt_static_metacall [0x00000001802EBDED+524541]
      	QtWebEngineCore::URLRequestCustomJobDelegate::qt_static_metacall [0x0000000182F99582+47372434]
      	QtWebEngineCore::URLRequestCustomJobDelegate::qt_static_metacall [0x0000000182E30FF2+45896450]
      	QtWebEngineCore::URLRequestCustomJobDelegate::qt_static_metacall [0x0000000182E2E641+45885777]
      	QtWebEngineCore::URLRequestCustomJobDelegate::qt_static_metacall [0x0000000182E2ED94+45887652]
      	QtWebEngineCore::WebContentsAdapterClient::operator= [0x00000001801DD21F+108927]
      	QtWebEngineCore::WebContentsAdapterClient::operator= [0x00000001801DCDCD+107821]
      	QDir::exists [0x0000000057A5B455+4649686]
      	QWidget::toolTipDuration [0x0000000055442036+263811]
      	QWidget::toolTipDuration [0x000000005543CD5B+242600]
      	QDir::exists [0x0000000057A0A2C4+4317509]
      	QDir::exists [0x0000000057A14813+4359828]
      	QDir::exists [0x0000000057A0B75D+4322782]
      	QDir::exists [0x0000000057ABB9FA+5044347]
      	QDir::exists [0x0000000057AB953E+5034943]
      	GetSystemMetrics [0x0000000076CCC3C1+689]
      	GetSystemMetrics [0x0000000076CCC60A+1274]
      	QDir::exists [0x0000000057ABA193+5038100]
      	QDir::exists [0x0000000057A05288+4296969]
      	QDir::exists [0x0000000057A054C3+4297540]
      	QtWebEngineCore::WebContentsAdapterClient::operator= [0x00000001801DC457+105399]
      	QtWebEngineCore::URLRequestCustomJobDelegate::qt_static_metacall [0x0000000182E30D43+45895763]
      	QtWebEngineCore::URLRequestCustomJobDelegate::qt_static_metacall [0x0000000182E7A75B+46197355]
      	QtWebEngineCore::URLRequestCustomJobDelegate::qt_static_metacall [0x0000000182E30BC5+45895381]
      	QtWebEngineCore::URLRequestCustomJobDelegate::qt_static_metacall [0x0000000182EACB3D+46403149]
      	QtWebEngineCore::URLRequestCustomJobDelegate::qt_static_metacall [0x0000000182EAD7CF+46406367]
      	QtWebEngineCore::URLRequestCustomJobDelegate::qt_static_metacall [0x0000000182ECAEAD+46526909]
      	BaseThreadInitThunk [0x0000000076BA59CD+13]
      	RtlUserThreadStart [0x0000000076DDB981+33]
      

      I also tried to use on "onNavigationRequested" but after clicking on URL, the WebEngineView won't allow me to append anything more inside the view (with javascript which I used previously)

      Anyway onNavigationRequested doesn't exists in Qt docs so I left that method.

      2) WebEngineView (javascript) won't allow me to read images from local files. Currently the only way to show emoticon is using http. Using:

      experimental.settings.localContentCanAccessFileUrls: true

      or anything from experimental - doesn't do anything with that.

      3) There is no simple API for inserting/appending/removing stuff from HTML. I had to use runJavaScript with appropriate script. Would be nice to have similar functionality as in older QWebView.

      Of course - points 2 and 3 are suggestions only

      Attachments

        Issue Links

          For Gerrit Dashboard: QTBUG-46713
          # Subject Branch Project Status CR V

          Activity

            People

              jbornema Joerg Bornemann
              krzysztoff7 Krzysztof
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes