[Kwintv] Need help for fullscreen keyevents

Zsolt Rizsanyi rizsanyi at myrealbox.com
Sat Oct 11 02:34:07 CEST 2003


On Friday 10 October 2003 22.09, Dirk Ziegelmeier wrote:
> Hello list,
>
> I just had a look at the problem that QtVision does not handle keyPress
> events in fullscreen/tv mode.
> I've added an "unknownKeyEvent(QKeyEvent* e)" signal to qtvisionview and
> injected the event via QApplication::sendEvent(MainWindowPtr, e) to the
> main window that contains the actionCollection. But it does not accept the
> keyPressEvent (returns false) - why does this happen? I think because it is
> hidden.
> Qt docs say in QWidget::setFocus that a hidden widget will not accept
> focus.
>
> Additionally, I noticed that if i call keyboardGrabber() in class
> MainWindow in fullscreen/tv mode, it returns 0L. There is a check for this
> in KAccelEventHandler (it's somewhere in the event's path through the app
> to the actionCollection).
>
> Does anybody have an idea what to do?

I have an idea :)
I'm not sure about it, but I see some pontential in it. :)
I have already sent it to the list. Did you miss it?

I'm resending it here:

----------  Forwarded Message  ----------

Subject: Re: [Kwintv] Starting an QtVision FAQ...
Date: Saturday 20 September 2003 12.02
From: Zsolt Rizsanyi <rizsanyi at myrealbox.com>
To: stefan at stefanhellwig.de, KWinTV General Mailing List <kwintv at mail.kde.org>

On Saturday 20 September 2003 11.36, Stefan Hellwig wrote:
> > Keyboard shortcuts don't work in fullscreen. (BTW: can someone give me a
> > hint where to search for the cause?)
>
> Hm... I'm wondering why that is because they worked before, that's at least
> what I think... If could have something to do with the focus policy, maybe
> the window doesn't get the keyboard focus in fullscreen mode somehow?!

IMHO the problem comes from the fact, that the widget containing the video
output is reparented (to make it a main window). Probably this reparented
window gets the focus, but the shortcuts are installed to the old mainwindow
(with the menu and stuff).

Probably the good solution would be to avoid reparenting and just make the
menubar, all the toolbars and the sidebar hidden and make the main window
fullscreen.

Note: The above is just an idea. I'm not a too good Qt programmer...

Regards
Zsolt
-------------------------------------------------------



More information about the kwintv mailing list