I have selected the lines relevant (sic) to the prolem:
first archiv.h puis archiv.cpp
{
Q_OBJECT
public:
~Archives();
protected:
void remplirArchiv();
};
class Archives : public QDialog
{
Q_OBJECT
public:
Archives( QWidget *parent = 0 );
~Archives();
protected:
QAbstractItemModel *model;
QTreeView *qArchiv;
void addArchiv( QString sDate, QString sDest, QString sMsg );
void remplirArchiv();
void selmsg( const QModelIndex() &);
QPushButton *pbOk;
};
To copy to clipboard, switch view to plain text mode
//****************************************************************
connect( qArchiv,
SIGNAL( clicked
( const QModelIndex() ) ),
}
{
accept();
close();
}
//****************************************************************
connect( qArchiv, SIGNAL( clicked( const QModelIndex() ) ),
this, SLOT( selmsg( const QModelIndex() ) ) );
}
void Archives::selmsg( const QModelIndex() idx )
{
accept();
close();
}
To copy to clipboard, switch view to plain text mode
compile:
7 C:\Qt\test\sms\archiv.cpp In file included from archiv.cpp
24 C:\Qt\test\sms\archiv.h variable or field `selmsg' declared void
24 C:\Qt\test\sms\archiv.h expected `;' before '(' token
60 C:\Qt\test\sms\archiv.cpp variable or field `selmsg' declared void
60 C:\Qt\test\sms\archiv.cpp `int Archives::selmsg' is not a static member of `class Archives'
60 C:\Qt\test\sms\archiv.cpp expected primary-expression before "const"
Bookmarks