[Qt-interest] cant emit the signal two times
chandrasekar wagmare
sekarwagmare at gmail.com
Thu Apr 2 16:48:52 CEST 2009
hi friends,
i am running a thread after a single 3sec timer slot ...
in the thread call run()
void ::run(){
static int paritybit = 1;
QString message , message2;
while(!quit){
if(paritybit == 1){
message = "<font color =white>The communication failed due
to heavy rain networ all jammed \n and the enemy is attacking ... no no
</font>";
emit newMessage(message);
usleep(5000000);
paritybit = 2;
}else if(paritybit == 2){
printf("is it emitting the signal again ... \n");
message2 = "<font color =yellow>The communication failed
due to heavy rain networ all jammed \n and the enemy is attacking ... no no
</font>";
emit newMessage(message2);
usleep(5000000);
paritybit = 1;
}
where at destructor i am setting quit = true .. so the run will always in
infinity loop ... and i try emit my signal newMessage(const QString
message) ..
but if i run .. only one signal is emitted at a time .. in
paritybit ==1 it emits the signal but in paritybit ==2 it clears the
previous but shows nothing ... why ..?
please help
--
CHANDRU
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090402/99d1c605/attachment.html
More information about the Qt-interest-old
mailing list