Qt支持C ++ 0x枚举类 [英] Qt support for C++0x enum class

查看:129
本文介绍了Qt支持C ++ 0x枚举类的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用 Q_ENUMS ,我现在可以使用Qt an注册在 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.

这个问题一般来说,询问Qt对C ++ 0x功能的支持。我正在特别询问枚举类。我意识到,由于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功能(包括枚举类)根据这个博文

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆