PDA

View Full Version : What's wrong with this connection??



SkripT
12th March 2006, 15:59
Hi all, I have the following connection:


qRegisterMetaType<ManegadorParamsProcessat::ResultatProcessat>("ResultatProcessat");
connect(&fotosThread, SIGNAL(nouFitxerProcessat(const QString &,
ManegadorParamsProcessat::ResultatProcessat, double)), this,
SLOT(novaFotoProcessada(const QString &, ManegadorParamsProcessat::ResultatProcessat,
double)));

when I execute the program with gdb debugger it alerts me that QObject::connect cannot queue arguments of type 'ManegadorParamsProcessat::ResultatProcessat' :confused:

I've defined 'ManegadorParamsProcessat::ResultatProcessat' in this way:

enum ResultatProcessat {ProcessatCorrecte, AnomaliesContorn, NomesFons, FitxerInvalid, ProcessatManual, ProcessatInvalid};
in the class 'ManegadorParamsProcessat'. I make the include to this class in the header of the class where I do the connection. So I dont' know what's wrong, anybody knows it?

Thanks

jacek
12th March 2006, 17:23
http://www.qtcentre.org/forum/showthread.php?t=538

SkripT
12th March 2006, 18:33
Thanks jacek, i'm gonna try it as the other post comments. The strange of the situation is that the same connection worked inserting the 'ResultatProcessat' enum in the class of the object that emits the signal. Very strange :confused: Do you know the reason?

jacek
12th March 2006, 18:50
the same connection worked inserting the 'ResultatProcessat' enum in the class of the object that emits the signal.
Did you declare this enum as public?

SkripT
12th March 2006, 20:44
Yes, of course. Finally it works declaring it with typedef. Thanks again.