[Qt-interest] Q_ENUM registering Problem

Denis Akhmetzyanov dakhmetzyanov at smartlabs.tv
Thu Apr 15 09:53:29 CEST 2010


Hi,
Is function QString fetchPic(MState state) in the mpainter class? Otherwise
you should use:

class mpainter : public QDialog {
       Q_OBJECT
       Q_ENUMS (MState)

public:
       enum MState{ready,wait,lost};
...
QString fetchPic(mpainter::MState state);
...
QString aa = fetchPic(mpainter::ready);


2010/4/15 Aaron Lewis <aaron.lewis1989 at gmail.com>

> -----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-----
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>



-- 
Best regards,
Denis Akhmetzyanov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100415/8a6dc8ed/attachment.html 


More information about the Qt-interest-old mailing list