Skip to content

Commit

Permalink
log.debug() the Qt QPA platform name to indicate X11 vs. wayland
Browse files Browse the repository at this point in the history
* The name indicates the active Qt platform plugin
  which determines if X11 or wayland is used
  • Loading branch information
aryoda committed Nov 5, 2022
1 parent 497e3d9 commit 8e0397f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions qt/qttools.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,14 @@ def createQApplication(app_name = 'Back In Time'):
qapp.style().objectName().lower() == 'windows' and \
'GTK+' in QStyleFactory.keys():
qapp.setStyle('GTK+')

try:
# The platform name indicates eg. wayland vs. X11, see also:
# https://doc.qt.io/qt-5/qguiapplication.html#platformName-prop
logger.debug(f"QT QPA platform plugin: {qapp.platformName()}")
except Exception as e:
logger.debug(f"QT QPA platform plugin unknown: {repr(e)}")

return qapp

def translator():
Expand Down

0 comments on commit 8e0397f

Please sign in to comment.