hi
i have a problem on QFileDialog,i want to save data from QTableWidget ,here is my function for saving but i am getting error!Please help me on this...
void AddressBook::on_actionSave_triggered()
{
this );
if (!fileName.isEmpty()) {
tableWidget->writeToFile(fileName);
}
}
void AddressBook::on_actionSave_triggered()
{
QString fileName = QFileDialog::getSaveFileName(
this );
if (!fileName.isEmpty()) {
tableWidget->writeToFile(fileName);
}
}
To copy to clipboard, switch view to plain text mode
error
addressbook.cpp: In member function ‘void AddressBook::on_actionSave_triggered()’:
addressbook.
cpp:78: error
: ‘class
QTableWidget’ has no member named ‘writeToFile’
make[1]: *** [debug/addressbook.o] Error 1
addressbook.cpp: In member function ‘void AddressBook::on_actionSave_triggered()’:
addressbook.cpp:78: error: ‘class QTableWidget’ has no member named ‘writeToFile’
make[1]: *** [debug/addressbook.o] Error 1
To copy to clipboard, switch view to plain text mode
Bookmarks