On Thursday 03 March 2011 20:02:59 Marco Martin wrote:
> On Thursday 03 March 2011, Farhad Hedayati-Fard wrote:
> > Hi,
> > I've worked on the focusing problem of widget explorer and activity
> > manager so that the search box has focus when they're opened.
> > it seems that now the search box has focus when they're opened , but the
> > keyEvents are processed by the ControllerWindow, (I've put qDebug()s in
> 
> it's correct ControllerWindow has the focus, since it's the view's widget.
> then when a view has the focus, a qgraphicsitem in the scene the view is
> viewing can have the focus... but focus of qgraphicsscene items and focus of
> the real widgets is a slightly different thing
> 
> > every focusInEvent() and focusOutEvent() to follow the focus being
> > passed
> > down through the widgets, and It goes to the search box, so I think that
> > the focusing is not the problem anymore).
> > I've also put qDebugs in keyPressEvent()s to see where keyPress events
> > are being processed, and found that they're going to
> > ControllerWindow::keyPressEvent()...
> > I tried using grabKeyboard() and releaseKeyboard() in searchbox's
> > focusInEvent() and focusOutEvent(). this works, but Marco told that
> > doing
> > so is dangerous when I was using it for calendar keyboard navigation.
> 
> no, better avoiding grabkeyboard ;)
> 
> > So, What should I do to get this working?
> 
> so the probem is that the cursor is blinking but the key evets aren't
> actually delivered?
> (at least is what i see happening here)

Yes, It's exactly what happens... Key events aren't delivered to the searchbox 
widget, ControllerWindow is stealing them on their way! :D
btw, If you start typing right after clicking on "Add widgets" you can type 
one or two characters! :P 
So whats happening there? It gets keyPressEvents for a moment and then it just 
has focus and can't accept any keyboard input? (I'm really confused, does it 
mean that two widgets has focus in the same moment?)

Cheers,
Farhad

_______________________________________________
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel

Reply via email to