mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
widgets are imported in view.py when are used
This commit is contained in:
parent
e682503f48
commit
eaf003cbd6
1 changed files with 10 additions and 1 deletions
|
|
@ -1,7 +1,14 @@
|
|||
from Qt import QtCore, QtWidgets
|
||||
from . import model
|
||||
from . import widgets
|
||||
from .constants import Roles
|
||||
# Imported when used
|
||||
widgets = None
|
||||
|
||||
|
||||
def _import_widgets():
|
||||
global widgets
|
||||
if widgets is None:
|
||||
from . import widgets
|
||||
|
||||
|
||||
class ArtistView(QtWidgets.QListView):
|
||||
|
|
@ -152,6 +159,8 @@ class TerminalView(QtWidgets.QTreeView):
|
|||
|
||||
self.clicked.connect(self.item_expand)
|
||||
|
||||
_import_widgets()
|
||||
|
||||
def event(self, event):
|
||||
if not event.type() == QtCore.QEvent.KeyPress:
|
||||
return super(TerminalView, self).event(event)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue