[Lazarus] Order of OnCreate and OnActivate in Qt4

Kostas Michalopoulos badsectoracula at gmail.com
Mon Nov 26 11:32:32 CET 2018


I wouldn't rely on event order as anything between the creation to
Application.Run could call Application.ProcessMessages - including some
components/controls you may be using. As a rule of thumb you should assume
that after calling a control (or form) that it can start receiving events.

In Qt4 styling is done through native code (QStyle subclasses) and it can
alter widgets (QStyle::polish) so it isn't unthinkable that a theme could
do something that generates events.


On Sun, Nov 25, 2018 at 6:47 PM zeljko via lazarus <
lazarus at lists.lazarus-ide.org> wrote:

> On 11/25/2018 04:43 PM, Vojtěch Čihák via lazarus wrote:
>
> > CRASH, because code in OnActivate assumes that FrmContext already exists.
> >
> > So, Qt4+Plastique has different order of events than Qt4+QtCurve.
> >
> > Unfortunately, I cannot reproduce with simple demo.
> >
> > What I'm doing wrong? Do I rely on something that is not guaranteed?
>
> Try to disable usage of QtNativeEventFilter in qtdefines.inc if it's
> enabled.
>
> zeljko
> --
> _______________________________________________
> lazarus mailing list
> lazarus at lists.lazarus-ide.org
> https://lists.lazarus-ide.org/listinfo/lazarus
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20181126/6faf9ba6/attachment.html>


More information about the Lazarus mailing list