From 5a28fe86af30bd3293f49ad09ee9c044e06ccbe3 Mon Sep 17 00:00:00 2001 From: Christian Ehrlicher Date: Sun, 1 Sep 2024 19:53:12 +0200 Subject: Examples/Sql/Masterdetail: Fix deleting rows Completely deleting a row in a QSqlTableModel needs a call to select() afterwards, otherwise a blank column will stay according the documentation of QSqlTableModel::removeRows() Also add albumdetails.xml to the resource file to make sure it's found during runtime. Pick-to: 6.8 Task-number: QTBUG-128434 Change-Id: Ie5cc38edfa27984d186467e3372b05987f78d14c Reviewed-by: David Faure Reviewed-by: Axel Spoerl --- examples/sql/masterdetail/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'examples/sql/masterdetail/main.cpp') diff --git a/examples/sql/masterdetail/main.cpp b/examples/sql/masterdetail/main.cpp index 50d99cf24e8..15a070bd67e 100644 --- a/examples/sql/masterdetail/main.cpp +++ b/examples/sql/masterdetail/main.cpp @@ -14,7 +14,7 @@ int main(int argc, char *argv[]) if (!createConnection()) return EXIT_FAILURE; - QFile albumDetails("albumdetails.xml"); + QFile albumDetails(":/albumdetails.xml"); MainWindow window("artists", "albums", &albumDetails); window.show(); return app.exec(); -- cgit v1.2.3