06-08-2012 03:11 PM
Does anyone know how to capture the Play/Pause Button with Qt? I tried looking for it in a keyPressEvent like I do for the swipe-down menu but nothing gets triggered there.
Thanks
Nic
Solved! Go to Solution.
06-11-2012 09:04 AM
Anybody have an idea? I thought I would bump this after the weekend. Something that may be of interest (and possibly part of the problem) is that when I use Qt Mobility I get an error message in my log:
Unable to request multimedia events
Anybody now why that would happen? This error is coming the from the standard mmrender_request_events function. Is there a permission/action I need to have? I have this right now:
<action system="true">run_native</action>
<action>access_shared</action>
<action>set_audio_volume</action>
<action>play_audio</action>
Interestingly I am prompted to accept the file permission but nothing is asked of the audio permissions.
Thanks
Nic
06-12-2012 11:39 AM
Hi,
It’s being investigated internally. Please log a Feature Request in JIRA and then post the JIRA Item URL back to this thread so we can help you monitor the status of your request.
Anthony
06-13-2012 11:34 AM
06-14-2012 03:56 PM
09-20-2012 11:41 AM
Hi,
Support for hardware buttons is now available in Qt 4.8 and Qt 5. See
https://codereview.qt-project.org/#change,34304 (Qt5)
https://codereview.qt-project.org/#change,34954 (Qt4)
The hardware buttons are mapped to Qt Key press events:
bid_minus -> Qt::Key_VolumeDown
bid_playpause -> Qt::Key_Play
bid_plus -> Qt::Key_VolumeUp
bid_power -> Qt::Key_PowerDown
Just override Qwidget::keyPressEvent() or QObject::event() as usual or use an eventFilter to respond to these events.
09-28-2012 09:36 AM
Awesome! I tested this today and it works as expected.
Thanks!
Nic
10-04-2012 12:52 PM
Is it possible to receive key events when the app is not in focus? I lose them when I switch to another app or if the PlayBook goes to standby.
Thanks
10-05-2012 04:11 AM
Good question. The honest answer is that I am not sure at the moment. I'll take a look.