2

I compiled and installed QtWebEngine + QML plugins on Raspberry Pi 2 with Yocto recipes using information in this tutorial using Yocto dizzy branch and run the following script:

root@raspberrypi2:~# more chromium.qml 
import QtQuick 2.1
import QtQuick.Controls 1.1
import QtWebEngine 0.9
ApplicationWindow {
    width: 1280
    height: 720
    color: "lightgray"
    visible: true
    WebEngineView {
        id: webview
        url: "file:///home/root/hello.html"
        anchors.fill: parent
    }
}

Note that the IMPORT VERSION 0.9, not 1.0

I have tried both url: "file:///home/root/hello.html" and url: "https://duckduckgo.com" but all I am getting is a red screen with the black square mouse pointer.

root@raspberrypi2:~# more hello.html 
<html>
<header><title>This is title</title></header>
<body>
Hello world
</body>
</html>

raspberry pi 2 LCD showing first white then red canvas with mouse pointer

On the console:

root@raspberrypi2:~# /usr/bin/qt5/qmlscene -v -platform eglfs chromium.qml 
[0605/163256:WARNING:resource_bundle.cc(280)] locale_file_path.empty()
[0605/163257:WARNING:proxy_service.cc(890)] PAC support disabled because there is no system implementation
[0605/163257:WARNING:resource_bundle.cc(280)] locale_file_path.empty()

PAC support disabled ... seems to be a none issue read here

UPDATE

I have followed this step-by-step tutorial (Poky fido branch) and then added qtwebengine (import QtWebEngine 1.0 this time) and qtwebengine-qmlplugins in my Yocto Image and created again my image with bitbake

When I booted and ran /usr/bin/qt5/qmlscene -v -platform eglfs chromium.qml I could see my HTML page.

I have tested a couple of dozen of websites and not all page show. So their might be a little more to it.

e.g.

http://wikipedia.com shows!!! 
http://google.com doesn't show ???
http://https://stackoverflow.com/ shows!!!
http://facebook.com doesn't

Any further pointers are welcome

UPDATE 20160309

root@raspberrypi2:~/app# uname -a
Linux raspberrypi2 4.1.10 #1 SMP PREEMPT Wed Feb 17 16:51:44 CET 2016 armv7l GNU/Linux


root@raspberrypi2:~/app# lsb_release -a
LSB Version:    core-4.1-noarch:core-4.1-arm
Distributor ID: poky
Description:    Poky (Yocto Project Reference Distro) 2.0.1
Release:    2.0.1
Codename:   jethro

QML

root@raspberrypi2:~/app# more chromium.qml 
import QtQuick 2.1
import QtQuick.Controls 1.1
import QtWebEngine 1.0

ApplicationWindow {
    width: 800
    height: 600
    color: "lightgray"
    visible: true
    WebEngineView {
        id: webview
        //url: "http://raspberrypi.stackexchange.com/" // PASS
        //url: "http://google.com" // FAIL
        //url: "http://video.webmfiles.org/big-buck-bunny_trailer.webm" // PASS but no Sound
        //url: "https://youtube.com/" // FAIL
        //url: "https://opentokrtc.com/anybots" // FAIL
        //url: "http://speedof.me/" // PASS
        url: "http://facebook.com"  // FAIL
        anchors.fill: parent
    }
}
Community
  • 1
  • 1
zabumba
  • 12,172
  • 16
  • 72
  • 129
  • 2
    I has the same problem on windows machine. After video driver installation this problem resolved. – synacker Jun 14 '15 at 12:31
  • 1
    Interesting. so you really had some URLs that were showing properly right? but others not. Can you be more specific of what you did, that may be a good hint to figure out what's happening on my side. Cheers! – zabumba Jun 14 '15 at 13:22
  • 1
    I didn't has QWebView, I has just a Qt Quick app. But after application start only a white screen was. Installation last driver fixed a problem. – synacker Jun 14 '15 at 13:27
  • 1
    Ok then it was a different issue. Hey thanks anyway! – zabumba Jun 14 '15 at 13:29
  • 2
    If on raspberry pi exist X Server, you can try to use QWebView from Qt Widgets or recompile qt without OpenGL support. If this will work fine, the problem in video driver. This is a very common mistake with OpenGL on Qt. – synacker Jun 14 '15 at 13:31

2 Answers2

3

Maybe it is a little late but I tried to build QtWebEngine in Qt 5.6 alpha and it works properly for me on Raspberry Pi 2 for all the URLs you listed. This is a demo. Maybe they fixed something in QtWebEngine, so you can try 5.6-alpha.

Luca Carlon
  • 9,546
  • 13
  • 59
  • 91
  • 1
    Luca on which OS are you running Qt? I have updated my question with the details of my environment See UPDATE 20160309. – zabumba Mar 09 '16 at 10:40
  • 2
    Raspbian and raspbian lite. – Luca Carlon Mar 09 '16 at 11:22
  • 1
    Actually even better, how do you install Qt5.6 + QtWebEngine on Raspbian? Want to try your setup on the RPi3 – zabumba Mar 09 '16 at 15:15
  • 2
    I'm sorry but I don't know about raspbian repos. I use my own builds. I uploaded a build here: http://thebugfreeblog.blogspot.it/2016/03/binaries-for-hardware-accelerated-qt.html. Or you can download a complete firmware here: http://thebugfreeblog.blogspot.it/2016/03/fully-optimised-raspbian-jessie-lite.html. – Luca Carlon Mar 13 '16 at 01:47
2

Unfortunately, the branch jethro for meta-qt5 the qtwebengine caused many problems.

I was happy to see that in this branch master with chromium 45:

Branch jethro: QT_MODULE BRANCH CHROMIUM = "40.0.2214-based"

Branch master: QT_MODULE BRANCH CHROMIUM = "45-based"

I will try to build;)

Cleiton Bueno
  • 326
  • 2
  • 10