cydside
18th April 2009, 15:18
Hi to All,
I'm passing a QMap parameter as follow:
frmExample.h
class frmExample : public QDialog
{
Q_OBJECT
public:
class frmExample(const QMap <QString, QVariant> &Names, QWidget *parent=0);
//...
}
frmExample.cpp
frmExample::frmExample(const QMap <QString, QVariant> &Names, QWidget *parent) : QDialog(parent)
{
ui.setupUi(this);
//...
}
and the compiler returns:
frmExample.cpp:1 error expected unqualified id before "const"
frmExample.cpp:1 error expected ')' before "const" :confused:
I remember that it's possible to pass abstract type as argument in C++, isn't it?
thanks
I'm passing a QMap parameter as follow:
frmExample.h
class frmExample : public QDialog
{
Q_OBJECT
public:
class frmExample(const QMap <QString, QVariant> &Names, QWidget *parent=0);
//...
}
frmExample.cpp
frmExample::frmExample(const QMap <QString, QVariant> &Names, QWidget *parent) : QDialog(parent)
{
ui.setupUi(this);
//...
}
and the compiler returns:
frmExample.cpp:1 error expected unqualified id before "const"
frmExample.cpp:1 error expected ')' before "const" :confused:
I remember that it's possible to pass abstract type as argument in C++, isn't it?
thanks