RFC [patch] 3.5.X ochange event in file widget - bug 107455
Konrad Rzepecki
hannibal at megapolis.pl
Wed Jan 10 16:35:39 GMT 2007
Dnia środa, 10 stycznia 2007 10:27, napisałeś(aś):
> My idea was along the lines of
> bool KURLRequester::eventFilter( QObject *obj, QEvent *ev )
> {
> if ( obj == d->edit || obj == d->combo ) {
> if ( ev->type() == QEvent::FocusIn || ev->type() ==
> QEvent::FocusOut ) { // Forward focusin/focusout events to the
> urlrequester; needed by file form element in khtml qApp->sendEvent( this,
> ev );
> }
> }
> return QWidget::eventFilter( obj, ev );
> }
> with widget->installEventFilter( this ) only, not installEventFilter(this).
I know, latest patch was only testing one.
> Does this work?
Yes, patch included. If you think this is ok, please commit it.
> else if ( event->type() == QEvent::FocusIn ) {
> focusInEvent( (QFocusEvent *)event );
> } else if ( event->type() == QEvent::FocusOut ) {
> focusOutEvent( (QFocusEvent *)event );
> But I'm guessing that just calling focusInEvent/focusOutEvent isn't enough
> in our case, we need event filters on the container widget (the
> urlrequester in our case) to be triggered.
I'm not very familiar with khtml events, but I think you have right.
PS. KDE 4.0 probably require something simmilar, but because it won't work for
me right now ( button doesn't fire up KFileDialog ), I don't know how it
should look exactly.
--
Konrad Rzepecki (Hannibal)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kdelibs9.diff
Type: text/x-diff
Size: 3129 bytes
Desc: not available
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20070110/609a0d68/attachment.diff>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20070110/609a0d68/attachment.sig>
More information about the kfm-devel
mailing list