[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re:
From:       "Antonio Aloisio" <antonio.aloisio () gmail ! com>
Date:       2007-01-23 20:39:29
Message-ID: 24b9c8a30701231239p465a8c91o1b5d74fac455a58c () mail ! gmail ! com
[Download RAW message or body]

I know that.. but it doesn't work! :(
m_part->widget() have the focus enabled.
Probably is the part..(Kate component)

However this is the value returned of event->type()

Now i use other event... QEvent::Hide.. and now works fine.!
Thnx Mr. Seigo! :)

On 1/23/07, Aaron J. Seigo <aseigo@kde.org> wrote:
> On Tuesday 23 January 2007 4:10, Antonio Aloisio wrote:
> > Hi! I've a problem, with  KParts::ReadOnlyPart m_text. i've installed
> > the filter in m_text->widget()->installEventFilter() but in my
> > eventFilter(QObject *obj, QEvent ev), the m_text->widget() don't emit
> > the event QEvent::FocusIn QEvent::FocusOut....anyone have some idea??
> > thnx
>
> from the QWidget API documentation:
>
> "void QWidget::focusInEvent ( QFocusEvent * ) [virtual protected]
>
> This event handler can be reimplemented in a subclass to receive keyboard
> focus events (focus received) for the widget.
>
> A widget normally must setFocusPolicy() to something other than NoFocus in
> order to receive focus events. (Note that the application programmer can
> call
> setFocus() on any widget, even those that do not normally accept focus.)"
>
> try m_text->widget()->setFocusPolicy(Qt::StrongFocus) (or whatever focus
> policy makes sense for your use case) and see if you start getting those
> events =)
>
> --
> Aaron J. Seigo
> humru othro a kohnu se
> GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43
>
> Full time KDE developer sponsored by Trolltech (http://www.trolltech.com)
>
>
 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic