[QTableView remove selected rows?
-
QStandardItemModel + QSqlQuery https://forum.qt.io/topic/76135/qsqlrelationaltablemodel-and-complex-queries/21
QSqlTableModel http://doc.qt.io/qt-5/qsqltablemodel.html#details
-
QSqlTableModel or QSqlRelationalTableModel does that for you if you can live with simple queries. if you have convoluted joins then you'll have to connect to the model
rowsRemoved
orrowsAboutToBeRemoved
signal and prepare the query manually -
... it's included as part of Qt's examples: http://doc.qt.io/qt-5/qtsql-relationaltablemodel-example.html
-
There is absolutely no difference. The trag and drop in Qt Designer generates an xml file describing your interface then
uic
converts that xml into code basically identical to the one in the examples.On top of this, your problem is not in the UI but in the model design so you should not really care about how the UI is created