Skip to content

Commit

Permalink
fix: Backlog/move pyside2 specific flag (#581)
Browse files Browse the repository at this point in the history
  • Loading branch information
dennisweil authored Oct 15, 2024
1 parent 298359b commit cade611
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
1 change: 1 addition & 0 deletions apps/connect/release_notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## Upcoming

* [changed] Move deprecated HighDPI settings into PySide2 specific codepath.
* [fix] Fix ctrl+c interrupt behaviour when launching connect through the commandline. It will now properly exit the application.
* [fix] Remove obsolete pkg_resources import which lead to errors when launching through the commandline

Expand Down
25 changes: 12 additions & 13 deletions apps/connect/source/ftrack_connect/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,21 +113,20 @@ def main_connect(arguments=None):
)
raise SystemExit(1)

# If under X11, make Xlib calls thread-safe.
# http://stackoverflow.com/questions/31952711/threading-pyqt-crashes-with-unknown-request-in-queue-while-dequeuing

if os.name == 'posix' and is_pyside2:
if is_pyside2:
# These HighDPI settings are deprecated and enabled by default in PySide6.
QtCore.QCoreApplication.setAttribute(
QtCore.Qt.ApplicationAttribute.AA_X11InitThreads
QtCore.Qt.AA_EnableHighDpiScaling, True
)

# Ensure support for highdpi
QtCore.QCoreApplication.setAttribute(
QtCore.Qt.AA_EnableHighDpiScaling, True
)
QtCore.QCoreApplication.setAttribute(
QtCore.Qt.ApplicationAttribute.AA_UseHighDpiPixmaps, True
)
QtCore.QCoreApplication.setAttribute(
QtCore.Qt.ApplicationAttribute.AA_UseHighDpiPixmaps, True
)
# If under X11, make Xlib calls thread-safe.
# http://stackoverflow.com/questions/31952711/threading-pyqt-crashes-with-unknown-request-in-queue-while-dequeuing
if os.name == 'posix':
QtCore.QCoreApplication.setAttribute(
QtCore.Qt.ApplicationAttribute.AA_X11InitThreads
)

# Construct global application.

Expand Down

0 comments on commit cade611

Please sign in to comment.