<p style="padding:0 0 0 0; margin:0 0 0 0;">Thanks, Kostas, especially part about Qt styling.</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;"> </p>
<p style="padding:0 0 0 0; margin:0 0 0 0;">I answered my solution yesterday, but it didn't appear in ML, it went to zejlko only - I noticed later. So here it is:</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;"> </p>
<p style="font-family: Arial, Helvetica, sans-serif; font-size: 14px;">I don't have <span style="margin: 0px; font-size: 13.3333px;">QtNativeEventFilter in qtdefines.inc at all.</span></p>
<p style="font-family: Arial, Helvetica, sans-serif; font-size: 14px;"><span style="margin: 0px; font-size: 13.3333px;">However, I found simple workaround. I create main form with Visible:=False; and when all other forms are created I do FrmMain.Show; (in *.lpr). The order of events is as expected.</span></p>
<p style="font-family: Arial, Helvetica, sans-serif; font-size: 14px;"> </p>
<p style="font-family: Arial, Helvetica, sans-serif; font-size: 14px;">Thanks.</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;"> </p>
<p style="padding:0 0 0 0; margin:0 0 0 0;">______________________________________________________________<br />
> Od: "Kostas Michalopoulos via lazarus" <lazarus@lists.lazarus-ide.org><br />
> Komu: "Lazarus mailing list" <lazarus@lists.lazarus-ide.org><br />
> Datum: 26.11.2018 11:32<br />
> Předmět: Re: [Lazarus] Order of OnCreate and OnActivate in Qt4<br />
></p>
<div dir="ltr">
<div>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.</div>
<div>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.</div>
</div>
<br />
<div class="gmail_quote">
<div dir="ltr">On Sun, Nov 25, 2018 at 6:47 PM zeljko via lazarus <<a href="mailto:lazarus@lists.lazarus-ide.org">lazarus@lists.lazarus-ide.org</a>> wrote:</div>
<blockquote class="gmail_quote" style="margin: 0 0 0 .8ex; border-left: 1px #ccc solid; padding-left: 1ex;">On 11/25/2018 04:43 PM, Vojtěch Čihák via lazarus wrote:<br />
<br />
> CRASH, because code in OnActivate assumes that FrmContext already exists.<br />
> <br />
> So, Qt4+Plastique has different order of events than Qt4+QtCurve.<br />
> <br />
> Unfortunately, I cannot reproduce with simple demo.<br />
> <br />
> What I'm doing wrong? Do I rely on something that is not guaranteed?<br />
<br />
Try to disable usage of QtNativeEventFilter in qtdefines.inc if it's <br />
enabled.<br />
<br />
zeljko<br />
-- <br />
_______________________________________________<br />
lazarus mailing list<br />
<a href="mailto:lazarus@lists.lazarus-ide.org">lazarus@lists.lazarus-ide.org</a><br />
<a href="https://lists.lazarus-ide.org/listinfo/lazarus">https://lists.lazarus-ide.org/listinfo/lazarus</a></blockquote>
</div>
<br />
<br />
----------<br />
<br />
-- <br />
_______________________________________________<br />
lazarus mailing list<br />
lazarus@lists.lazarus-ide.org<br />
<a href="https://lists.lazarus-ide.org/listinfo/lazarus">https://lists.lazarus-ide.org/listinfo/lazarus</a><br />