Results 1 to 4 of 4

Thread: help me!

  1. #1
    Join Date
    Jun 2011
    Posts
    16
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Symbian S60

    Default help me!

    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 .

  2. #2
    Join Date
    Sep 2009
    Location
    Wroclaw, Poland
    Posts
    1,394
    Thanked 342 Times in 324 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: help me!

    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

  3. #3
    Join Date
    Jun 2011
    Posts
    16
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Symbian S60

    Default Re: help me!

    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.

  4. #4
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: help me!

    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.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.