Problem to declare a stl map - Q_DECLARE_METATYPE
Hi,
I have a problem with Q_DECLARE_METATYPE
I´m trying to declare the type map<string,string> to use it at signals and slots, but because of the type contains a comma I get the following error:
macro "Q_DECLARE_METATYPE" passed 2 arguments, but takes just 1
How could I declare that type?
Thanks in advance.
Regards.
Re: Problem to declare a stl map - Q_DECLARE_METATYPE
Re: Problem to declare a stl map - Q_DECLARE_METATYPE
I´ve tried it already but it doesn´t work :(
Re: Problem to declare a stl map - Q_DECLARE_METATYPE
show us the code you tried
Re: Problem to declare a stl map - Q_DECLARE_METATYPE
Hi
The first code:
Code:
Q_DECLARE_METATYPE(QMap<QString, QString>);
The code using typedef:
Code:
typedef QMap<QString, QString> myQMap;
Q_DECLARE_METATYPE(myQMap);
Re: Problem to declare a stl map - Q_DECLARE_METATYPE
Hi
The problem is solved. I needed to include <QMetaType> to use typedef.
Regards.