He probably missed to implement the writeToFile function from AddressWidget example
void AddressWidget
::writeToFile(QString fileName
) {
QMessageBox::information(this, tr
("Unable to open file"),
file.
errorString());
return;
}
QList< QPair<QString, QString> > pairs = table->getList();
out << pairs;
}
void AddressWidget::writeToFile(QString fileName)
{
QFile file(fileName);
if (!file.open(QIODevice::WriteOnly)) {
QMessageBox::information(this, tr("Unable to open file"), file.errorString());
return;
}
QList< QPair<QString, QString> > pairs = table->getList();
QDataStream out(&file);
out << pairs;
}
To copy to clipboard, switch view to plain text mode
Bookmarks