1

Some background on what i am doing and what i would like to accomplish is i have compiled weston without the toolbar and background so it is just a black screen. i did this because when i run the commands:

$ weston &
$ ./pure-qml -platform wayland

it will start the weston window manager as a black screen instead of the desktop before launching the pure-qml example from Qt.

what my end goal is to skip weston all together and just start pure-qml example from command line without needing weston running.

From qtwayland examples if i run:

./qwindow-compositor &
./pure-qml -platform wayland --single

it fails with cant create a display (file or directory missing). My understanding is qt has a wayland compositor.

how can i create an qt standalone app that uses wayland backend and creates a screen just like how weston can be started from command line.

Bbbh
  • 321
  • 7
  • 20

2 Answers2

1

My understanding is qt has a wayland compositor.

In qtwayland module, there is only a sample compositor to show you how to use the base class provided by qtwayland to create your own compositor.

how can i create an qt standalone app that uses wayland backend and creates a screen just like how weston can be started from command line.

Because of the server-client architecture of wayland, you must launch server side before client side. you need to fork your compositor (server side) in your Qt application before call wl_display_connect() in your app.

gzh
  • 3,507
  • 2
  • 19
  • 23
1

pure-qml is a compositor.

So you just need to run that on your preferred platform plugin, it will generally be eglfs, i.e.

./pure-qml -platform eglfs

Then run the clients with

./myclient -platform wayland
bobbaluba
  • 3,584
  • 2
  • 31
  • 45