Qt支持C ++ 0x枚举类 [英] Qt support for C++0x enum class
问题描述
使用 Q_ENUMS 我现在可以使用Qt注册 enum
声明在继承自 QObject
的类中。这给了我一些很酷的反射功能的枚举
。
Using Q_ENUMS I can now "register" with Qt an enum
declared inside a class that inherists from QObject
. This gives me a few cool reflection features for the enum
.
我也很喜欢类型安全枚举类
在C ++ 0x中引入。我想知道你是否知道Qt开发人员支持枚举类
的计划的任何公告。
I'm also really enjoying the type-safe enum class
introduced in C++0x. I'm wondering if you know of any announcement made by Qt developers of plans for support for the enum class
.
这个问题一般地询问了关于C ++ 0x功能的Qt支持。我特别询问枚举类
。我意识到,因为Qt是跨平台的并且支持许多编译器,支持C ++ 0x将是慢慢推出,但枚举类
是一个非常好的简单改进核心语言!
This question vaguely asks about Qt support of C++0x features in general. I'm asking specifically about enum class
. I realize that since Qt is cross-platform and supports many compilers, support for C++0x will be SLOW to roll out, but enum class
is a very nice simple improvement of the core language!
推荐答案
看起来Qt 4.8将支持许多主要的C ++ 0x功能(包括 enum class
)根据此博文。
It appears that Qt 4.8 will have support for many major C++0x features (including enum class
) according to this blog post.
这篇关于Qt支持C ++ 0x枚举类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!