diff --git a/sources/nameslist.cpp b/sources/nameslist.cpp index e1def936c..b02a3fcf8 100644 --- a/sources/nameslist.cpp +++ b/sources/nameslist.cpp @@ -16,6 +16,8 @@ along with QElectroTech. If not, see . */ #include "nameslist.h" +// make this class usable with QVariant +int NamesList::MetaTypeId = qRegisterMetaType("NamesList"); /** Constructeur diff --git a/sources/nameslist.h b/sources/nameslist.h index 2f748ef2b..7f00056c6 100644 --- a/sources/nameslist.h +++ b/sources/nameslist.h @@ -37,6 +37,9 @@ class NamesList { private: QHash hash_names; + public: + static int MetaTypeId; + // methodes public: // methodes relatives a la gestion de la liste @@ -59,4 +62,5 @@ class NamesList { protected: QHash getXmlOptions(const QHash & = QHash()) const; }; +Q_DECLARE_METATYPE(NamesList); #endif