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