[Qt-interest] focusout

jani at wbsources.com jani at wbsources.com
Tue Sep 6 11:20:42 CEST 2011


Your idea is good.
Doing things like things works almost as it should be.
Still have little problems to solve, but I am quite satisfied with the
results.
Thanks you.

> Ok, Here is what comes to my mind. I didnt try it though.
>
> use leaveEvent() and enterEvent() to track whether mouse is inside the
> parent or not. and then use event filters to know whether any of your
> child widgets lost focus
>
> in parent
> if ((dont have mouse) && (focus out event))
> {
>     do your work;
> }
>
>>
>> Thank you for reply.
>>
>> >
>> >
>> > On Mon, 2011-09-05 at 18:54 +0530, jani at wbsources.com wrote:
>> >> Dear members,
>> >>
>> >> I have a main widget and child spinbox on it.
>> >> I want to filter focus out event only on the main widget.
>> >> The problem comes when the spinbox has the focus and the user clicks
>> >> outside the main widget then only spinbox looses focus, but I must
>> >> monitor
>> >> only the main widgets' events. Is there a way to link the main widget
>> >> with
>> >> the spinbox to detect focus out event on the parent?
>> >>
>> > I didnt quite understand what you want to do. But whichever way you
>> want
>> > to monitor events eventFilter() is your friend.
>> >
>> >>
>> >> _______________________________________________
>> >> Qt-interest mailing list
>> >> Qt-interest at qt.nokia.com
>> >> http://lists.qt.nokia.com/mailman/listinfo/qt-interest
>> >
>> > --
>> > Thanks,
>> > Pritam
>> >
>> >
>> >
>> > **************** CAUTION - Disclaimer *****************
>> > This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended
>> > solely
>> > for the use of the addressee(s). If you are not the intended
>> recipient,
>> > please
>> > notify the sender by e-mail and delete the original message. Further,
>> you
>> > are not
>> > to copy, disclose, or distribute this e-mail or its contents to any
>> other
>> > person and
>> > any such actions are unlawful. This e-mail may contain viruses.
>> Infosys
>> > has taken
>> > every reasonable precaution to minimize this risk, but is not liable
>> for
>> > any damage
>> > you may sustain as a result of any virus in this e-mail. You should
>> carry
>> > out your
>> > own virus checks before opening the e-mail or attachment. Infosys
>> reserves
>> > the
>> > right to monitor and review the content of all messages sent to or
>> from
>> > this e-mail
>> > address. Messages sent to or from this e-mail address may be stored on
>> the
>> > Infosys e-mail system.
>> > ***INFOSYS******** End of Disclaimer ********INFOSYS***
>> > _______________________________________________
>> > Qt-interest mailing list
>> > Qt-interest at qt.nokia.com
>> > http://lists.qt.nokia.com/mailman/listinfo/qt-interest
>> >
>>
>>
>> _______________________________________________
>> Qt-interest mailing list
>> Qt-interest at qt.nokia.com
>> http://lists.qt.nokia.com/mailman/listinfo/qt-interest
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at qt.nokia.com
> http://lists.qt.nokia.com/mailman/listinfo/qt-interest
>





More information about the Qt-interest-old mailing list