archiv.h
Qt Code:
  1. class Archives : public QDialog
  2. {
  3. Q_OBJECT
  4.  
  5. public:
  6. Archives( QWidget *parent = 0 );
  7. ~Archives();
  8. QString getFileName( const QModelIndex &);
  9. ...
To copy to clipboard, switch view to plain text mode 
archiv.cpp
Qt Code:
  1. //****************************************************************
  2. QString Archives::getFileName( const QModelIndex & idx )
  3. {
  4. return model->data(idx.sibling(idx.row(), 0)).toString();
  5. }
To copy to clipboard, switch view to plain text mode 

and menu.cpp
Qt Code:
  1. //****************************************************************
  2. void ApplicationWindow::archives()
  3. {
  4. Archives Archives_dlg( this );
  5. if ( Archives_dlg.exec() )
  6. {
  7. QString s = Archives_dlg->getFileName( const QmodelIndex & idx);
  8. }
  9. }
To copy to clipboard, switch view to plain text mode 
and the compiler says :
QString s = Archives_dlg->getFileName( const QmodelIndex & idx);
180 C:\Qt\test\sms\menu.cpp base operand of `->' has non-pointer type `Archives'

in the procedure above I make a similar call with (apparently the same syntax) and it works, so I don't know.