PDA

View Full Version : help me!



tamnv110
24th June 2011, 10:13
I have a button, when clicked on it, the app will pronounce "hello". But when multi click in a short time, the app will pronounce "hello" consecutive.
I want to click on the button when reading from hello continue receiving events click next.
Please help me!

I used Phonon pronounce .

stampede
24th June 2011, 10:55
You'll have to disable the "click" events during audio playback. You can disconnect your push button when audio is started, and connect it again when stopped. Alternatively, you can have a boolean variable to remember the audio state (on/off) and use it to start audio only if its "off" in your "button clicked" slot.
Btw. for future, try to give your topic more descriptive name :)

tamnv110
24th June 2011, 11:25
Thank stampede!
I'll try it your way, i used qthread but it not succesfull.
I'm currently trying to learn English, so I have difficulty in expressing my thoughts.

ChrisW67
24th June 2011, 23:51
You can call QWidget::setEnabled() on your button with false as the argument when you start playing, and true when you finish playing. The button will not accept multiple clicks and changes to show the user that it cannot be clicked.