use qtpy in workfiles tool

This commit is contained in:
Jakub Trllo 2022-12-21 13:48:23 +01:00
parent 227c61d20e
commit fa48c9dce3
5 changed files with 7 additions and 7 deletions

View file

@ -3,8 +3,8 @@ import logging
import shutil
import copy
import Qt
from Qt import QtWidgets, QtCore
import qtpy
from qtpy import QtWidgets, QtCore
from openpype.host import IWorkfileHost
from openpype.client import get_asset_by_id
@ -618,7 +618,7 @@ class FilesWidget(QtWidgets.QWidget):
"caption": "Work Files",
"filter": ext_filter
}
if Qt.__binding__ in ("PySide", "PySide2"):
if qtpy.API in ("pyside", "pyside2"):
kwargs["dir"] = self._workfiles_root
else:
kwargs["directory"] = self._workfiles_root

View file

@ -1,4 +1,4 @@
from Qt import QtWidgets, QtCore, QtGui
from qtpy import QtWidgets, QtCore, QtGui
from openpype.style import load_stylesheet, get_app_icon_path
from openpype.pipeline.workfile.lock_workfile import get_workfile_lock_data

View file

@ -1,7 +1,7 @@
import os
import logging
from Qt import QtCore, QtGui
from qtpy import QtCore, QtGui
import qtawesome
from openpype.client import (

View file

@ -3,7 +3,7 @@ import re
import copy
import logging
from Qt import QtWidgets, QtCore
from qtpy import QtWidgets, QtCore
from openpype.pipeline import (
registered_host,

View file

@ -1,7 +1,7 @@
import os
import datetime
import copy
from Qt import QtCore, QtWidgets, QtGui
from qtpy import QtCore, QtWidgets, QtGui
from openpype.client import (
get_asset_by_name,