Important: Please read the Qt Code of Conduct -

Error while running Qt application with wayland

  • Hi,

    I am trying to run simple Qt application Hello World on Ubuntu 18.04 desktop with wayland. Following commands I tried.

    $ export QT_QPA_PLATFORM=wayland
    $ ./qello
    also tried with following command
    $ ./qello -platform wayland

    but I am getting the same error.
    $ ./qello -platform wayland
    Failed to create wl_display (No such file or directory)
    qt.qpa.plugin: Could not load the Qt platform plugin "wayland" in "" even though it was found.
    This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

    Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl, xcb.
    Aborted (core dumped)

    I have installed weston-launch. I am able to run that in virtual terminal ctrl+alt+F2.
    Do I need install any package or need to do some configuration?

  • @amol_k
    See whether export QT_DEBUG_PLUGINS=1 gives you more information about why the plugin could not be initialized.

  • Yes, I tried but same errors I am getting.

  • @amol_k
    So you don't get pages of diagnostic output?

  • Lifetime Qt Champion

    Hi and welcome to devnet,

    Might be a silly question but are you running a wayland session ?

Log in to reply