Thread
:
QEnum string value?
View Single Post
cjard
2010-03-11 , 11:28
Posts: 225 | Thanked: 64 times | Joined on Feb 2010
#
1
Guys
In .net, if I have an enum:
enum MyEnum{
Blah = 0,
BlahBlah = 1
}
and have a result:
MyEnum e = getRandomMyEnum(); //returns a random enum entry
I can do this:
e.ToString("g") //instead of "2", I will get "BlahBlah"
to turn my enum into a nice string
-
I read this:
http://labs.trolltech.com/blogs/2008...g-enum-values/
But I'm not sure where to shove the macro that Kevin defined. Any tips?
Quote & Reply
|
cjard
View Public Profile
Send a private message to cjard
Find all posts by cjard