Qt5学習。QtでSQLite3を使う。QSqlTableModelを使ってみた01。
QSqlTableModel::record()
にてテーブル定義から作られたQSqlRecord(QsqlField)が取得できた
- https://github.com/ytyaru/Cpp.Qt.Widget.QtSqlTableModel.20181128180000
- https://github.com/ytyaru/Cpp.Qt.Widget.QtSqliteDb.20181128160000
- https://github.com/ytyaru/Cpp.Qt.Widget.QtSqliteDb.20181128120000
- https://github.com/ytyaru/Cpp.Qt.Widget.QSql.SQLite3.Transaction.20181128070000
- https://github.com/ytyaru/Cpp.Qt.Widget.QSql.SQLite3.Class.20181127180000
- https://github.com/ytyaru/Cpp.Qt.Widget.QSql.SQLite3.Class.20181127170000
- https://github.com/ytyaru/Cpp.Qt.Widget.QSql.SQLite3.Class.20181127160000
- https://github.com/ytyaru/Cpp.Qt.Widget.QSql.SQLite3.Class.20181127130000
QSqlRecord rec = model.record();
rec.setValue("Memo", QVariant("あああ"));
rec.setValue("Created", QVariant("1999-12-31 23:59:59"));
model.insertRecord(0, rec);
QSqlTableModel::record()
にてテーブル定義から作られたQSqlRecord(QsqlField)が取得できる。
- Raspberry Pi 3 Model B+
- Raspbian GNU/Linux 9.0 (stretch) 2018-06-27
- Qt 5.7.1
- Raspbian GNU/Linux 9.0 (stretch) 2018-06-27
このソフトウェアはCC0ライセンスである。
ライブラリ | ライセンス | ソースコード |
---|---|---|
Qt | LGPL | GitHub |