summaryrefslogtreecommitdiffstats
path: root/examples/sql/masterdetail/main.cpp
diff options
context:
space:
mode:
authorChristian Ehrlicher <ch.ehrlicher@gmx.de>2024-09-01 19:53:12 +0200
committerChristian Ehrlicher <ch.ehrlicher@gmx.de>2024-09-07 23:12:43 +0200
commit5a28fe86af30bd3293f49ad09ee9c044e06ccbe3 (patch)
treec36c5ec79e771070cb80d17687b9eb1f5979e546 /examples/sql/masterdetail/main.cpp
parent48753a03de7c9c394fbf4cf69e2c2f3d1048c85f (diff)
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 <david.faure@kdab.com> Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Diffstat (limited to 'examples/sql/masterdetail/main.cpp')
-rw-r--r--examples/sql/masterdetail/main.cpp2
1 files changed, 1 insertions, 1 deletions
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();