[Qt-interest] The dangers of removePostedEvents?
Girish Ramakrishnan
girish at forwardbias.in
Mon Dec 6 16:42:54 CET 2010
Are you removing standard Qt events or custom events? If you are
removing your custom events, it's not a problem, as long as you know
what you are doing. As for Qt events, many events are expected to
arrive - like a QEvent::Resize is supposed to arrive before the first
show, a QEvent::Show is supposed to arrive before a widget becomes
visible etc. If you remove such events, code will most likely break.
As the docs say, you should almost never need this function. Can you
tell us what is the need for you to use it?
Girish
On Mon, Dec 6, 2010 at 3:48 PM, Mihail Naydenov <mlists at ymail.com> wrote:
> Anyone?
>
> Thank You
> MihailNaydenov
>
>
>
> ----- Original Message ----
>> From: Mihail Naydenov <mlists at ymail.com>
>> To: qt-interest at trolltech.com
>> Sent: Mon, November 29, 2010 11:53:10 AM
>> Subject: [Qt-interest] The dangers of removePostedEvents?
>>
>> Hello,
>> I ended up using QApplicstion::removePostedEvents, but the docs advice not
> to.
>>
>> "...You should never need to call this function. If you do call it, be aware
>> that killing events may cause receiver to break one or more invariants."
>>
>> Please explain this section to me, what are the real dangers I might run
> into?
>> Thus far I found that removePostedEvents is *exactly* what I need, and my
>> program behaves best when using it,
>>
>> but I am a bit frightened by this warning.
>>
>> Thank you in advance.
>> MihailNaydenov
>>
>>
>>
>>
>> _______________________________________________
>> Qt-interest mailing list
>> Qt-interest at trolltech.com
>> http://lists.trolltech.com/mailman/listinfo/qt-interest
>>
>
>
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
More information about the Qt-interest-old
mailing list