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...

Qt Code:
  1. void AddressBook::on_actionSave_triggered()
  2. {
  3.  
  4. QString fileName = QFileDialog::getSaveFileName(
  5. this );
  6.  
  7. if (!fileName.isEmpty()) {
  8. tableWidget->writeToFile(fileName);
  9. }
  10. }
To copy to clipboard, switch view to plain text mode 


error
Qt Code:
  1. addressbook.cpp: In member function ‘void AddressBook::on_actionSave_triggered()’:
  2. addressbook.cpp:78: error: ‘class QTableWidget’ has no member named ‘writeToFile’
  3. make[1]: *** [debug/addressbook.o] Error 1
To copy to clipboard, switch view to plain text mode