m-labs / artiq

A leading-edge control system for quantum information experiments
https://m-labs.hk/artiq
GNU Lesser General Public License v3.0
437 stars 201 forks source link

gui: force xcb instead of wayland #2531

Closed Spaqin closed 3 months ago

Spaqin commented 3 months ago

ARTIQ Pull Request

Description of Changes

Ensures that Wayland is not used, as embedding applets in the GUI is not possible.

Note that the qt.qpa.plugin: Could not find the Qt platform plugin "wayland" in "" warning is still present, even if by default it wouldn't be used (platformName() still returns "xcb").

Related Issue

2513

Type of Changes

Type
:bug: Bug fix

Steps (Choose relevant, delete irrelevant before submitting)

All Pull Requests

Code Changes

Git Logistics

Licensing

See copyright & licensing for more info. ARTIQ files that do not contain a license header are copyrighted by M-Labs Limited and are licensed under LGPLv3+.

sbourdeauducq commented 3 months ago

I don't think we should use QT_QPA_PLATFORM in this way. AFAICT it is only used in debug settings to force a specific platform plugin. On the opposite of what is being done right now, I think we should remove the Wayland check and the -platform xcb if QT_QPA_PLATFORM is set to anything.

Spaqin commented 3 months ago

AFAICT it is only used in debug settings to force a specific platform plugin.

Yes, and we want to force xcb platform plugin; this is more of a guard if the user wanted to. Although probably anyone setting this env variable would know what they're doing.