Issue with QHash <p>I been trying and trying to get this to work but it just refuses to work. I read the QT documentation and I'm just unable to get the insert function to function. When I build I get the following complication errors</p> <pre><code>/home/mmanley/projects/StreamDesk/libstreamdesk/SDDatabase.cpp: In constructor 'SDDatabase::SDDatabase()': /home/mmanley/projects/StreamDesk/libstreamdesk/SDDatabase.cpp:27:44: error: no matching function for call to 'QHash&lt;QString, SDChatEmbed&gt;::insert(const char [9], SDChatEmbed (&amp;)())' /usr/include/qt4/QtCore/qhash.h:751:52: note: candidate is: QHash&lt;Key, T&gt;::iterator QHash&lt;Key, T&gt;::insert(const Key&amp;, const T&amp;) [with Key = QString, T = SDChatEmbed] make[2]: *** [libstreamdesk/CMakeFiles/streamdesk.dir/SDDatabase.cpp.o] Error 1 make[1]: *** [libstreamdesk/CMakeFiles/streamdesk.dir/all] Error 2 </code></pre> <p>here is the header file:</p> <pre><code>class SDStreamEmbed { Q_OBJECT public: SDStreamEmbed(); SDStreamEmbed(const SDStreamEmbed &amp;other); QString FriendlyName() const; SDStreamEmbed &amp;operator=(const SDStreamEmbed &amp;other) {return *this;} bool operator==(const SDStreamEmbed &amp;other) const {return friendlyName == other.friendlyName;} private: QString friendlyName; }; Q_DECLARE_METATYPE(SDStreamEmbed) inline uint qHash(const SDStreamEmbed &amp;key) { return qHash(key.FriendlyName()); } </code></pre> <p>and the implementation</p> <pre><code>SDStreamEmbed::SDStreamEmbed() { } SDStreamEmbed::SDStreamEmbed(const SDStreamEmbed&amp; other) { } QString SDStreamEmbed::FriendlyName() const { return friendlyName; } </code></pre> <p>and how I am invoking it</p> <pre><code>SDChatEmbed embedTest(); ChatEmbeds.insert("DemoTest", embedTest); </code></pre> <p>and the definition of ChatEmbeds</p> <pre><code>QHash&lt;QString, SDStreamEmbed&gt; StreamEmbeds; </code></pre>