mirror of
https://github.com/Syncplay/syncplay
synced 2025-02-18 20:16:50 +00:00
parent
9b90dd50a7
commit
b248f6c2f7
@ -15,8 +15,11 @@ from syncplay.vendor.Qt import QtCore, QtWidgets, QtGui, __binding__, IsPySide,
|
|||||||
from syncplay.vendor.Qt.QtCore import Qt, QSettings, QCoreApplication, QSize, QPoint, QUrl, QLine, QEventLoop, Signal
|
from syncplay.vendor.Qt.QtCore import Qt, QSettings, QCoreApplication, QSize, QPoint, QUrl, QLine, QEventLoop, Signal
|
||||||
from syncplay.vendor.Qt.QtWidgets import QApplication, QLineEdit, QLabel, QCheckBox, QButtonGroup, QRadioButton, QDoubleSpinBox, QPlainTextEdit
|
from syncplay.vendor.Qt.QtWidgets import QApplication, QLineEdit, QLabel, QCheckBox, QButtonGroup, QRadioButton, QDoubleSpinBox, QPlainTextEdit
|
||||||
from syncplay.vendor.Qt.QtGui import QCursor, QIcon, QImage, QDesktopServices
|
from syncplay.vendor.Qt.QtGui import QCursor, QIcon, QImage, QDesktopServices
|
||||||
|
try:
|
||||||
if hasattr(QtCore.Qt, 'AA_EnableHighDpiScaling'):
|
if hasattr(QtCore.Qt, 'AA_EnableHighDpiScaling'):
|
||||||
QtWidgets.QApplication.setAttribute(QtCore.Qt.AA_EnableHighDpiScaling, True)
|
QtWidgets.QApplication.setAttribute(QtCore.Qt.AA_EnableHighDpiScaling, True)
|
||||||
|
except AttributeError:
|
||||||
|
pass # To ignore error "Attribute Qt::AA_EnableHighDpiScaling must be set before QCoreApplication is created"
|
||||||
if hasattr(QtCore.Qt, 'AA_UseHighDpiPixmaps'):
|
if hasattr(QtCore.Qt, 'AA_UseHighDpiPixmaps'):
|
||||||
QtWidgets.QApplication.setAttribute(QtCore.Qt.AA_UseHighDpiPixmaps, True)
|
QtWidgets.QApplication.setAttribute(QtCore.Qt.AA_UseHighDpiPixmaps, True)
|
||||||
if IsPySide2:
|
if IsPySide2:
|
||||||
|
@ -26,8 +26,11 @@ if isLinux():
|
|||||||
applyDPIScaling = False
|
applyDPIScaling = False
|
||||||
else:
|
else:
|
||||||
applyDPIScaling = True
|
applyDPIScaling = True
|
||||||
|
try:
|
||||||
if hasattr(QtCore.Qt, 'AA_EnableHighDpiScaling'):
|
if hasattr(QtCore.Qt, 'AA_EnableHighDpiScaling'):
|
||||||
QtWidgets.QApplication.setAttribute(QtCore.Qt.AA_EnableHighDpiScaling, applyDPIScaling)
|
QtWidgets.QApplication.setAttribute(QtCore.Qt.AA_EnableHighDpiScaling, applyDPIScaling)
|
||||||
|
except AttributeError:
|
||||||
|
pass # To ignore error "Attribute Qt::AA_EnableHighDpiScaling must be set before QCoreApplication is created"
|
||||||
if hasattr(QtCore.Qt, 'AA_UseHighDpiPixmaps'):
|
if hasattr(QtCore.Qt, 'AA_UseHighDpiPixmaps'):
|
||||||
QtWidgets.QApplication.setAttribute(QtCore.Qt.AA_UseHighDpiPixmaps, applyDPIScaling)
|
QtWidgets.QApplication.setAttribute(QtCore.Qt.AA_UseHighDpiPixmaps, applyDPIScaling)
|
||||||
if IsPySide2:
|
if IsPySide2:
|
||||||
|
Loading…
Reference in New Issue
Block a user