def createView(title, model): view = QTableView() view.setModel(model) view.setWindowTitle(title) return view