Hi, try inserting a new append inside the isEmpty() check, so that you can know whether the execution gets there: i.e:
MainWindow::ui->textDumpMessage->append("Before the QStringList fileList line");
if (fileList.isEmpty())
{
MainWindow::ui->textDumpMessage->append("File is Empty");
return false;
}
MainWindow::ui->textDumpMessage->append("After the QStringList fileList line");
qDebug() << "Load csv";
MainWindow::ui->textDumpMessage->append("Before the QStringList fileList line");
QStringList fileList = QFileDialog::getOpenFileNames(this, tr("Open CSV"), QDir::currentPath(), tr("CSV File *.csv"));
if (fileList.isEmpty())
{
MainWindow::ui->textDumpMessage->append("File is Empty");
return false;
}
MainWindow::ui->textDumpMessage->append("After the QStringList fileList line");
qDebug() << "Load csv";
To copy to clipboard, switch view to plain text mode
Notice the new line I have added before return false;.
Now tell us what happens then.
Bookmarks