[Qt-interest] Q_ENUM registering Problem

Aaron Lewis aaron.lewis1989 at gmail.com
Thu Apr 15 08:03:12 CEST 2010


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,
	Right now , i'm trying to register an enum in Qt.

class mpainter : public QDialog {
	Q_OBJECT
	Q_ENUMS (MState)

	enum MState{ready,wait,lost};
	
...

	
And a Function , QString fetchPic(MState state);

I tried to call fetchPic like this:

QString aa = fetchPic(MState::ready);


Doesn't work , it tolds me MState's not a namespace or class.

Do i lack something here ?


Appreciate any of your help ;-)


- -- 
Best Regards,
Aaron Lewis - PGP: 0x4A6D32A0
FingerPrint EA63 26B2 6C52 72EA A4A5 EB6B BDFE 35B0 4A6D 32A0
irc: A4r0n on freenode
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkvGrCAACgkQvf41sEptMqAClQCgrl8TWDr6P/WhTXLCup85ghNr
MJkAn3cuWN3uCs03XXN12nqYMPNCbJma
=iQS+
-----END PGP SIGNATURE-----



More information about the Qt-interest-old mailing list