[Qt] FreePascal Qt4 binding: Qt 4.2.1 preview

Den Jean Den.Jean at telenet.be
Sun Jan 28 19:10:47 CET 2007


On Wednesday 20 December 2006 19:08, Hess, Philip J wrote:
> Den,
>
> The app does start up and paints the main form's outline, then displays
> an error message - but this stays up only a fraction of a second before
> it crashes - too quick for me to read what it says.
>
I spent some time debugging it. 
At some point an invalid Qt handle was passed
to the library, but where this handle became
corrupted was not clear.

constructor TQtDeviceContext.Create(WidgetHandle: THandle);
....
    Parent := TQtWidget(WidgetHandle).Widget;
    Widget := QPainter_create(QWidget_to_QPaintDevice(Parent));

The parent value obtained with the type cast for the 4th button 
of the demo project was invalid. (pointer value way different than with
the other buttons.

With fpc 2.0.5 no problem, but with fpc 2.1.1 problems.
After update of svn of today for both fpc 211 and lazarus & qt,
the problem is gone. I am not sure where the problem was: fpc or lcl/qt


I hope it doesn't come back :-)



More information about the Qt mailing list