Failure in converting PyQt5 to PyQt6
Phil Thompson
phil at riverbankcomputing.com
Mon Dec 30 10:54:40 GMT 2024
On 30/12/2024 08:43, ullix wrote:
> A have a larger Python program, based on PyQt5, and running well on
> Linux, Win, Mac. I tried to convert to PyQt6 and failed.
>
> I changed all "PyQt5" to "PyQt6", and used the tool from K.Mulier
> (https://stackoverflow.com/a/72658216/6178507) to convert the enums,
> which - so far- seemed to have worked ok.
>
> However, upon starting, the program crashes at the execution of:
>
> gapp = QApplication([])
>
> with the message:
>
> qt.qpa.plugin: From 6.5.0, xcb-cursor0 or libxcb-cursor0 is needed to
> load the Qt xcb platform plugin.
> qt.qpa.plugin: Could not load the Qt platform plugin "xcb" 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: wayland-egl, linuxfb, wayland, vnc,
> vkkhrdisplay, minimal, eglfs, minimalegl, offscreen, xcb.
>
> I had seen this obscure message a few years earlier with PyQt5. Back
> the it could be "fixed" by executing:
> sudo apt-get install libxcb-xinerama0
>
> Today with PyQt6 this does NOT help.
>
> What now?Any guidance?
Install the missing dependency. The exact name is probably
distro-specific.
Phil
More information about the PyQt
mailing list