[Qt-interest] bloody ungraspable control of my pusbutton

Jeroen De Wachter jeroen.dewachter at barco.com
Tue Feb 2 08:46:41 CET 2010


Hi Sal,

Are you doing this in your one and only thread?

Because your loop does not allow the event loop to run, I think (unless
chk_msg() is showing a QDialog or something of the like)?

If your event loop does not run, the button will indeed never respond to
anything again... (and your application will not redraw, either)

You may want to do this in a seperate thread, so the event loop in your
GUI thread still gets processed.

Kind regards,

Jeroen De Wachter

PS: I am by no means the best here, but hth ;)

On Mon, 2010-02-01 at 20:21 -0800, S. Aguinaga wrote:
> Dear Fellows,
> 
> 
> I have a question for the best of you.
> 
> 
> I have a button that initiates a tone stimulus using my audio device.
> This stimulus is meant to be continuous until the pushbutton is
> toggled,
> but what is happening is that once my code goes into the audio loop
> it 
> never allows control back to my pushbutton, in other words, I can't
> toggle it
> and right now the only way out is to go to the terminal and do
> control-C.
> 
> 
> here is the loop:
> 
> 
> while ( contToneButton->isChecked() ) {
>         chk_msg();
>         c = (int) floor((1 + oct0) * ncue / 2);
>         cue(c);
>         (void) ar_io_cur_seg(dvid);
> };
> 
> 
> have any of you come across something like this an do you mind
> sharing 
> your methods?
> 
> 
> 
> 
> Thank you
> 
> 
> // Sal Aguinaga
> // Northwestern University
> 
> 
> 
> 
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest



DISCLAIMER:
Unless indicated otherwise, the information contained in this message is privileged and confidential, and is intended only for the use of the addressee(s) named above and others who have been specifically authorized to receive it. If you are not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this message and/or attachments is strictly prohibited. The company accepts no liability for any damage caused by any virus transmitted by this email. Furthermore, the company does not warrant a proper and complete transmission of this information, nor does it accept liability for any delays. If you have received this message in error, please contact the sender and delete the message. Thank you.





More information about the Qt-interest-old mailing list