Solved QML webEngineView component works in standalone app, but not in QML Stack View app.
-
I am able to run recipebrowser example application (part of Qt webengine example) as standalone on my target HMI. I ported it to my QML application. It runs fine on my
host (dev) machine, but not on my target HMI.
Does anyone can help me about it, please? -
Here is more details:
Here is more details.
My host is Ubuntu 18.04. and I am using Qt Creator with Qt 5.10.0 version
My target is Yocto Linux based on Rocko Distro on IMX6 hardware.
I am doing cross compilation with arm-guf-linux-gnueabi-
So again. The WebEngineView works fine when it is used in a standalone application.
But when I used it in a Page QML elements it start loading and freeze . -
Hi and welcome to devnet,
How are you starting your application on your device ?
Did check with a debugger ?
Do you have any warnings or error messages ?
Did you try with a current version of Qt 5 ? 5.10 is out of date and unsupported. -
Hello SGaist,
I tried to start it on 3 different ways:
- Downloading app and run from Qt Creator
- Downloading app and run from Qt Creator in debug mode, and
- Run from command line on target.
Every way I got the same result when I press the button to open that page. Half page is loaded and view window become frozen. The header and foot tool bars are still active,
but the other pages can not be loaded any more.
No error messages, but one warring:
[0704/114317.002747:WARNING:stack_trace_posix.cc(648)] Failed to open file: /home/sandbox/#12338332 (deleted)
I can not try any other version of Qt but 5.9.6 or 5.10. due to not support from Yocto
Linux for newer Qt for my particular HMI. The results are the same.
If WebEngineView is component of ApplicationWindow or Window QML type in a standalone application no issue. But when I integrate the same code in my app that is
StackView based and I use WebEngine in Page QML type then I have this issue.
I checked all Qt Libraries on my host and target and they all mach.
Any help how to debug this would be greatly appreciated, as I am stack here for second week now. -
Looks like it fails to open some files, is your system somehow read-only ?
-
I check the dmesg log and thre is info about recovering readonly filesystem and that
write access is enabled during recover. I also run fsck and all is fine before I run the app
and the same issue.
The confusing stuff here is why WeEngine works in a standalone app, but not in my app. -
I found that there is difference in command line arguments for the QtWebEnbineProcess for standalone apps (that opens webengineveiw correctly - cmdline 1) and my apps that freeze while trying to open webengineview ( cmdline 2)
Here it is:
cmdline1: ccelerated-video-decode --disable-gpu-memory-buffer-video-frames --disable-shared-workers --enable-overlay-scrollbar --enable-pinch --enable-threaded-compositing --enable-viewport --main-frame-resizes-are-orientation-changes --profiler-timing=0 --use-gl=egl --disable-composited-antialiasing --primordial-pipe-token=7AD81FD113B0EE86534E9B3A418154E5 --lang=en-US --enable-pinch --num-raster-threads=1 --contcmdline2:ccelerated-video-decode --disable-gpu-memory-buffer-video-frames --disable-shared-workers --enable-overlay-scrollbar --enable-pinch --enable-threaded-compositing --enable-viewport --main-frame-resizes-are-orientation-changes --profiler- timing=0 --use-gl=egl --disable-composited-antialiasing --primordial-pipe-token=AD96DD361410448A2DC55E7AB209724F --
lang=en-US --enable-pinch --num-raster-threads=1 --content-image-texture-target=0,0,3553;0,1,3553;0,2,3553;0,3,3553;0What is the best way to change WebEngineProcess command line options?
I tried to set it from main app using qenv but don't see it applied to. -
That I do not know, sorry.
-
Do you think that the issue that WebEngineView can be successfully used in some other QML type, but ApplictionWindow or Window?
-
I had to instantiate my qml component that contains WebEngineView in the qml files where the StackView is used before I call it to be pushed by stackview.