Qt and unix signals trapping

Hi. In my program written on ruby+qt I want to bind desktop-wide
keyboard shortcut to some function. Default qt does not support this.
What is the best method to reach this goal?

(This was also posted on Freenode’s #qtruby few days before, still not

I tried to bind global keyboard shortcut to shellscript that sighups my
application but the handler seems to be launched only after a long time
~10s-1m. I posted more details and test sample to
Unix signals travel to handlers very slowly · Issue #42 · ryanmelt/qtbindings · GitHub (now I think I should
have asked here first). On my system ruby interpreter performs write(4,
“!”, 1) just after receiving sighup. If Qt::Application was created and
exec’ed, we then see unsuccessful read and recvfrom continued by poll.
This every poll lasts for very long time. If we do not launch
Qt::Application, after sighup we receive sigvtalarm and then immediately
run signal handler.

Please tell me whether unix-signal approach is (should be) good enough
and if there is a way better method.

Nearly-actual sources of my app can be seen at
Modem tray notifier · GitHub by the way.