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. Task-number: QTBUG-128434 Change-Id: Ie5cc38edfa27984d186467e3372b05987f78d14c Reviewed-by: David Faure <david.faure@kdab.com> Reviewed-by: Axel Spoerl <axel.spoerl@qt.io> (cherry picked from commit 5a28fe86af30bd3293f49ad09ee9c044e06ccbe3) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
22 lines
479 B
C++
22 lines
479 B
C++
// Copyright (C) 2016 The Qt Company Ltd.
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
|
|
|
|
#include "database.h"
|
|
#include "mainwindow.h"
|
|
|
|
#include <QApplication>
|
|
#include <QFile>
|
|
|
|
int main(int argc, char *argv[])
|
|
{
|
|
QApplication app(argc, argv);
|
|
|
|
if (!createConnection())
|
|
return EXIT_FAILURE;
|
|
|
|
QFile albumDetails(":/albumdetails.xml");
|
|
MainWindow window("artists", "albums", &albumDetails);
|
|
window.show();
|
|
return app.exec();
|
|
}
|