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 waylandbut 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? -
Hi and welcome to devnet,
Might be a silly question but are you running a wayland session ?
-
To all:
I can't find the Wayland files: wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl, xcb
I would like to know how you got these files: wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl, xcb
However, I was able to get my applications (one being Anaconda-Navigator, another being openmc-plotter) to run and change the font size.
I am using Anaconda3 in Ubuntu in a WSL2 environment on a Windows 11 box.
After installing QT6, by adding the following lines to my .bashrc file, I was able to at least get some apps to work, and Anaconda-Navigator, to change the font size. The only setting that seems to work for me is "xcb". I still get the can't find Wayland message. I hope this helps.Ron
export QT_FONT_DPI=150
export QT_QPA_PLATFORM_PLUGIN_PATH=$HOME/anaconda3/lib/qt6/plugins/platforms
export QT_QPA_PLATFORM=xcb$HOME/anaconda3/lib/qt6/plugins/platforms contains the following files:
libqlinuxfb.so libqminimal.so libqoffscreen.so libqvnc.so libqxcb.so -
Hi,
From a quick search, I think you need to install the qt6-wayland package from conda.