General: Qt scale enhancement (#5059)

* set 'QT_SCALE_FACTOR_ROUNDING_POLICY' to 'PassThrough'

* implemented 'get_openpype_qt_app' which set all openpype related attributes

* implemented get app functions in igniter and ayon common

* removed env varaibles 'QT_SCALE_FACTOR_ROUNDING_POLICY'

* formatting fixes

* fix line length

* fix args
This commit is contained in:
Jakub Trllo 2023-05-30 16:45:55 +02:00 committed by Jakub Trllo
parent a76989108e
commit 594f1014ce
12 changed files with 104 additions and 94 deletions

View file

@ -1,7 +1,8 @@
import sys
from qtpy import QtWidgets, QtGui
from qtpy import QtGui
from openpype import style
from openpype.tools.utils import get_openpype_qt_app
from .lib import (
BTN_FIXED_SIZE,
CHILD_OFFSET
@ -24,9 +25,7 @@ def main(user_role=None):
user_role, ", ".join(allowed_roles)
))
app = QtWidgets.QApplication.instance()
if not app:
app = QtWidgets.QApplication(sys.argv)
app = get_openpype_qt_app()
app.setWindowIcon(QtGui.QIcon(style.app_icon_path()))
widget = MainWidget(user_role)