There is a table:
tab=QTableView()
sti=QStandardItemModel(parent=None)
sti.appendRow([QStandardItem(str(1)),QStandardItem(str(2)),QStandardItem(str(3)),QStandardItem(str(4))])
tab.setModel(sti)
tab.setEditTriggers(QAbstractItemView.NoEditTriggers)
There is a button:
btn=QPushButton('Press', self)
btn.clicked.connect(self.on_clicked)
btn.resize(btn.sizeHint())
Task: How can I insert button btn in the table cell insert of QStandardItem(str(4))? There is a method .setCellWidget() of class QTableWidget for it, but I inherited from QTableView. If I'll use QTableWidget I'll can't use private method .setModel()