mirror of
https://github.com/bec-project/bec_widgets.git
synced 2025-12-30 02:31:20 +01:00
fix(bec_widgets): by default the linux display manager is switched to xcb
This commit is contained in:
@@ -1,4 +1,12 @@
|
||||
import os
|
||||
import sys
|
||||
|
||||
from bec_widgets.utils.bec_widget import BECWidget
|
||||
from bec_widgets.utils.error_popups import SafeProperty, SafeSlot
|
||||
|
||||
if sys.platform.startswith("linux"):
|
||||
qt_platform = os.environ.get("QT_QPA_PLATFORM", "")
|
||||
if qt_platform != "offscreen":
|
||||
os.environ["QT_QPA_PLATFORM"] = "xcb"
|
||||
|
||||
__all__ = ["BECWidget", "SafeSlot", "SafeProperty"]
|
||||
|
||||
@@ -847,8 +847,6 @@ class AdvancedDockArea(BECMainWindow):
|
||||
if __name__ == "__main__":
|
||||
import sys
|
||||
|
||||
if sys.platform.startswith("linux"):
|
||||
os.environ["QT_QPA_PLATFORM"] = "xcb"
|
||||
app = QApplication(sys.argv)
|
||||
dispatcher = BECDispatcher(gui_id="ads")
|
||||
main_window = AdvancedDockArea()
|
||||
|
||||
Reference in New Issue
Block a user