mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-10 08:54:14 +02:00
[view] FormComponent
This commit is contained in:
@@ -3,9 +3,10 @@ from typing import List
|
||||
from PyQt5.QtCore import QSize
|
||||
from PyQt5.QtWidgets import QMessageBox, QVBoxLayout, QLabel, QWidget, QScrollArea, QFrame
|
||||
|
||||
from bauh.api.abstract.view import ViewComponent, SingleSelectComponent, MultipleSelectComponent, TextInputComponent
|
||||
from bauh.api.abstract.view import ViewComponent, SingleSelectComponent, MultipleSelectComponent, TextInputComponent, \
|
||||
FormComponent
|
||||
from bauh.view.qt import css
|
||||
from bauh.view.qt.components import MultipleSelectQt, new_single_select, TextInputQt
|
||||
from bauh.view.qt.components import MultipleSelectQt, new_single_select, TextInputQt, FormQt
|
||||
from bauh.view.util.translation import I18n
|
||||
|
||||
|
||||
@@ -45,6 +46,8 @@ class ConfirmationDialog(QMessageBox):
|
||||
inst = MultipleSelectQt(comp, None)
|
||||
elif isinstance(comp, TextInputComponent):
|
||||
inst = TextInputQt(comp)
|
||||
elif isinstance(comp, FormComponent):
|
||||
inst = FormQt(comp)
|
||||
else:
|
||||
raise Exception("Cannot render instances of " + comp.__class__.__name__)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user