[Lazarus] QtObjectFromWidgetH: QObject_property returned a variant which is not TQtWidget.

zeljko zeljko at holobit.net
Sun Apr 5 16:51:29 CEST 2015


On 04/05/2015 04:05 PM, zeljko wrote:
> On 04/05/2015 02:57 PM, Juha Manninen wrote:
>> On Sunday, April 5, 2015, FreeMan <freeman35 at delphiturkiye.com
>> <mailto:freeman35 at delphiturkiye.com>> wrote:
>>
>>     "QtObjectFromWidgetH: QObject_property returned a variant which is
>>     not TQtWidget."
>>     press OK to....................
>>
>>
>> Good to know somebody else can also reproduce this. Zeljko cannot
>> reproduce.
>> We both have 64-bit systems while Zeljko has a 32-bit system. Maybe that
>> makes the difference.
>
> What is "border" icon ? Close button in title bar ?

Now I can reproduce each time. Non modal, non Application.MainForm Form 
which does not have OnCloseQuery assigned will raise such exception if 
it's closed via close button in title bar.
Exception is raised from FocusChanged in qtobject.inc, since OldWidget 
is probably destroyed. IMO, we should not raise exception there, just 
check IsValidHandle(), and if it isn't return Nil.

zeljko





More information about the Lazarus mailing list