def render(self, gui_context): from camelot.view.controls.tableview import TableView table_view = TableView(gui_context, self.admin, self.search_text, proxy=self.proxy) table_view.set_subclass_tree(self.subclasses) self.update_table_view(table_view) return table_view
def __init__(self, gui_context, admin, search_text, proxy, parent=None): super(SelectDialog, self).__init__(parent) layout = QtWidgets.QVBoxLayout() layout.setContentsMargins(0, 0, 0, 0) layout.setSpacing(0) self.setWindowTitle(_('Select %s') % admin.get_verbose_name()) self.setSizeGripEnabled(True) table = TableView(gui_context, admin, search_text=search_text, proxy=proxy, parent=self) table.setObjectName('table_view') layout.addWidget(table) self.setLayout(layout) self.objects = [] self.setWindowState(Qt.WindowMaximized)