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. QML webEngineView component works in standalone app, but not in QML Stack View app.
Qt 6.11 is out! See what's new in the release blog

QML webEngineView component works in standalone app, but not in QML Stack View app.

Scheduled Pinned Locked Moved Solved QML and Qt Quick
10 Posts 2 Posters 1.9k Views 1 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.
  • P Offline
    P Offline
    psafet
    wrote on last edited by aha_1980
    #1

    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?

    1 Reply Last reply
    0
    • P Offline
      P Offline
      psafet
      wrote on last edited by
      #2

      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 .

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

        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.

        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
        1
        • P Offline
          P Offline
          psafet
          wrote on last edited by
          #4

          Hello SGaist,

          I tried to start it on 3 different ways:

          1. Downloading app and run from Qt Creator
          2. Downloading app and run from Qt Creator in debug mode, and
          3. 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.

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

            Looks like it fails to open some files, is your system somehow read-only ?

            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
            • P Offline
              P Offline
              psafet
              wrote on last edited by
              #6

              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.

              1 Reply Last reply
              0
              • P Offline
                P Offline
                psafet
                wrote on last edited by
                #7

                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 --cont

                cmdline2: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;0

                What 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.

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

                  That I do not know, sorry.

                  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
                  • P Offline
                    P Offline
                    psafet
                    wrote on last edited by
                    #9

                    Do you think that the issue that WebEngineView can be successfully used in some other QML type, but ApplictionWindow or Window?

                    1 Reply Last reply
                    0
                    • P Offline
                      P Offline
                      psafet
                      wrote on last edited by
                      #10

                      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.

                      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