Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Qt5 wayland gui application
Qt 6.11 is out! See what's new in the release blog

Qt5 wayland gui application

Scheduled Pinned Locked Moved Solved Mobile and Embedded
4 Posts 2 Posters 8.4k 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.
  • G Offline
    G Offline
    Gerard_Mc
    wrote on last edited by
    #1

    Previously I was using Qt4 running with the -qws option.

    I have now changed to Qt5. As I understand it, qws is no longer a supported platform so I'm trying to run my gui application using the wayland compositor.

    I have included the Qt5 and qtwayland packages in my custom yocto build. I can run console applications but if I try use the -wayland specifier to run my gui application I get the folowing:

    root@beaglebone:~# ./bbb3 -platform wayland
    error: XDG_RUNTIME_DIR not set in the environment.
    Failed to create display (No such file or directory)

    Could someone point me in the right direction?

    Thanks.

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

      Hi and welcome to devnet,

      Did you took a look at the QtWayland Wiki Page ?

      Hope it helps

      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
      • G Offline
        G Offline
        Gerard_Mc
        wrote on last edited by
        #3

        Thanks for the welcome and your quick response.

        After some research I discovered that I first need to run the weston compositor before running my application. I included the weston packages in my yocto build and ran it with the following commands:

        mkdir -p /tmp/$USER-weston
        chmod 0700 /tmp/$USER-weston
        export XDG_RUNTIME_DIR=/tmp/$USER-weston
        weston --tty=1 --backend=fbdev-backend.so &

        Then I successfully ran my QT5 gui application with the wayland platform specifier:

        ./myQt5App -platform wayland

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

          Nice ! Happy coding !

          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