Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2015-04

QtObjectFromWidgetH: QObject_property returned a variant which is not TQtWidget.

10 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

FreeMan

yosemite x64 qt lazarus r48632
I get this error, when I click to close border icon of "breakpoitns" form. I get same error, when my application's form close from border icon.

"QtObjectFromWidgetH: QObject_property returned a variant which is not TQtWidget."
press OK to....................

I get this error, when click to Ok button.

Press "Ignore" to continue debugging. This may NOT be safe. Press "Abort" to stop the debugger.

Exception: Exception with message "QtObjectFromWidgetH: QObject_property returned a variant which is not TQtWidget."

Context: TGDBMIDebugger. State: dsRun

$00000001001BE074

$00000001001BE140

$00000001001BFEFD

$0000000106B41C2E

$0000000105BE19AD

$0000000105BE9720

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20150405/66ba5240/attachment.html>

Reply by email

Juha Manninen
to FreeMan
FreeMan wrote 5 lines
"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.

Juha
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20150405/b15687d7/attachment.html>

Reply by email

zeljko
to Juha Manninen
Juha Manninen wrote 11 lines
On Sunday, April 5, 2015, FreeMan < <mailto:>> 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.

I cannot reproduce it on 64bit Fedora 19 too, but I'm still using fpc-2.6.4.Freeman is using 3.xx and probably you, so that can make difference. Anyway, I didn't try to close debugger windows, just using lazarus and my apps.

zeljko

Reply by email

zeljko
to Juha Manninen: Good to know somebody else can also reproduce this. Zeljko cannot reproduce. We both have…
Juha Manninen wrote 11 lines
On Sunday, April 5, 2015, FreeMan < <mailto:>> 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 ?

zeljko

Reply by email

zeljko
to zeljko: I cannot reproduce it on 64bit Fedora 19 too, but I'm still using fpc-2.6.4.Freeman is…
zeljko wrote 18 lines
On 04/05/2015 02:57 PM, Juha Manninen wrote: > On Sunday, April 5, 2015, FreeMan < > <mailto:>> 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. I cannot reproduce it on 64bit Fedora 19 too, but I'm still using fpc-2.6.4.Freeman is using 3.xx and probably you, so that can make difference. Anyway, I didn't try to close debugger windows, just using lazarus and my apps.

Cannot reproduce with fixes_3_0 + lazarus trunk too, qt-4.8.6, Fedora 19 64bit, KDE.
For you and freeman: pls. before raising exception add IsValidHandle(HWND(Obj)) and check result. That could be destroyed handle inside event.

zeljko

Reply by email

zeljko
to zeljko: What is "border" icon ? Close button in title bar ? zeljko
zeljko wrote 15 lines
On 04/05/2015 02:57 PM, Juha Manninen wrote: > On Sunday, April 5, 2015, FreeMan < > <mailto:>> 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

Reply by email

zeljko
to Juha Manninen: Good to know somebody else can also reproduce this. Zeljko cannot reproduce. We both have…
Juha Manninen wrote 11 lines
On Sunday, April 5, 2015, FreeMan < <mailto:>> 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.

Fixed. That exception comes from nil object.

zeljko

Reply by email

FreeMan
to zeljko: What is "border" icon ? Close button in title bar ? zeljko
zeljko wrote
What is "border" icon ? Close button in title bar ? zeljko

Yes. Close button in title bar ?
while answering, came fixed message

Fixed. That exception comes from nil object. zeljko

I'm sorry, I been late and couldn't answer,( headache) I'll test in a few seconds, and let you know
Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20150405/ec4e5941/attachment.html>

Reply by email