<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Using enum in QMap]]></title><description><![CDATA[[[topic:post-is-deleted]]]]></description><link>https://forum.qt.io/topic/158504/using-enum-in-qmap</link><generator>RSS for Node</generator><lastBuildDate>Thu, 24 Sep 2026 08:05:50 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/158504.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 02 Sep 2024 07:33:21 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Using enum in QMap on Mon, 02 Sep 2024 08:01:19 GMT]]></title><description><![CDATA[<p dir="auto">You will have to be more specific because, for example, this compiles just fine:</p>
<pre><code>#include &lt;QCoreApplication&gt;

enum MyEnum {
    param1 = 0,
    param2 = 1
};

int main(int argc, char *argv[])
{
    QMap&lt;QString, MyEnum&gt; map;
    map["zero"] = param1;
    map["one"]  = param2;

    QCoreApplication a(argc, argv);
    return a.exec();
}
</code></pre>
]]></description><link>https://forum.qt.io/post/808526</link><guid isPermaLink="true">https://forum.qt.io/post/808526</guid><dc:creator><![CDATA[ChrisW67]]></dc:creator><pubDate>Mon, 02 Sep 2024 08:01:19 GMT</pubDate></item></channel></rss>