0

How can we create QWaylandSurface programatically? The current QWindow compositor samples do not provide sufficient details. Is it to be created using native wayland APIs directly or Qt provides a mechanism to wrap a window object as QWayland surface?

bobbaluba
  • 3,584
  • 2
  • 31
  • 45

1 Answers1

0

When a client connects and creates a surface, the signal QWaylandCompositor::surfaceRequested is emitted. You can attach a signal handler and instantiate a QWaylandSurface yourself there if you need to do something special.

If you don't create a QWaylandSurface or a derivative in that handler, then a QWaylandSurface is created automatically and will be provided in the QWaylandCompositor::surfaceCreated signal.

bobbaluba
  • 3,584
  • 2
  • 31
  • 45