mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-02 08:54:53 +01:00
added project combobox to window
This commit is contained in:
parent
00b1f35526
commit
64e4d3be4a
2 changed files with 13 additions and 0 deletions
|
|
@ -3,6 +3,8 @@ from .constants import (
|
|||
)
|
||||
from .view import HierarchyView
|
||||
from .model import (
|
||||
ProjectModel,
|
||||
|
||||
HierarchyModel,
|
||||
HierarchySelectionModel,
|
||||
BaseItem,
|
||||
|
|
@ -18,6 +20,8 @@ __all__ = (
|
|||
|
||||
"HierarchyView",
|
||||
|
||||
"ProjectModel",
|
||||
|
||||
"HierarchyModel",
|
||||
"HierarchySelectionModel",
|
||||
"BaseItem",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
from Qt import QtWidgets, QtCore
|
||||
|
||||
from . import (
|
||||
ProjectModel,
|
||||
|
||||
HierarchyModel,
|
||||
HierarchySelectionModel,
|
||||
HierarchyView
|
||||
|
|
@ -15,6 +17,12 @@ class Window(QtWidgets.QWidget):
|
|||
|
||||
dbcon = AvalonMongoDB()
|
||||
|
||||
project_model = ProjectModel(dbcon)
|
||||
|
||||
project_combobox = QtWidgets.QComboBox()
|
||||
project_combobox.setModel(project_model)
|
||||
project_combobox.setRootModelIndex(QtCore.QModelIndex())
|
||||
|
||||
hierarchy_model = HierarchyModel(dbcon)
|
||||
|
||||
hierarchy_view = HierarchyView(hierarchy_model, self)
|
||||
|
|
@ -32,6 +40,7 @@ class Window(QtWidgets.QWidget):
|
|||
# btn = QtWidgets.QPushButton("Refresh")
|
||||
|
||||
main_layout = QtWidgets.QVBoxLayout(self)
|
||||
main_layout.addWidget(project_combobox)
|
||||
main_layout.addWidget(hierarchy_view)
|
||||
main_layout.addWidget(checkbox)
|
||||
# main_layout.addWidget(btn)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue