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

@ -5,7 +5,7 @@ from qtpy import QtWidgets, QtCore, QtGui
from openpype import style
from openpype.pipeline import AvalonMongoDB
from openpype.tools.utils.lib import center_window
from openpype.tools.utils.lib import center_window, get_openpype_qt_app
from openpype.tools.utils.assets_widget import SingleSelectAssetsWidget
from openpype.tools.utils.constants import (
PROJECT_NAME_ROLE
@ -376,9 +376,7 @@ def main(
strict=True
):
# Run Qt application
app = QtWidgets.QApplication.instance()
if app is None:
app = QtWidgets.QApplication([])
app = get_openpype_qt_app()
window = ContextDialog()
window.set_strict(strict)
window.set_context(project_name, asset_name)