I'm moving an old project to Qt5 and since we've upgraded compiler and now have 
C++11 support I thought I'd change my enums to "enum class". This breaks some 
code where I add the enum to a QVariantMap in preparation to conversion to JSON 
so I had to add a static_cast<int>(). But it made me wonder - is this best 
practice or is there a Qt way of declaring a strongly-typed enum that's 
compatible with the likes of QVariant?

Thanks,

Tom Isaacson



_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to