[Qt] TQtWidget

zeljko zeljko at holobit.net
Wed Jul 11 19:08:26 CEST 2007


On Wednesday 11 July 2007 17:30, Павел Ишенин wrote:
> Hello, Items specific to the Qt widget set
>
> I have a problem with adding new fields into TQtWidget class. I dont
> know why. Maybe some dependency somewhere on TQtWidget memory layout?
>
> If I add 2 fields (tryed with 2 Boolean fields into public section) for
> example
>
>   public
>     AVariant: QVariantH;
>     Widget: QWidgetH;
>     LCLObject: TWinControl;
>     HasCaret: Boolean; <--- this
>     InPaint: Boolean; <--- and this
>
> then I have problems with starting qt ide (AV in TQtMenu destructor). If
> I am tring to debug ide with gdb then I have no  AV. Without adding that
> 2 fields I have no AV also. Even adding one fields cause AV.
>
> So please, if you know about some dependency on TQtWidget layout in
> memory then let me know. Ofcource this can be memory corruptions caused
> by other code. If you know how to catch mem leaks and corruptions under
> lazarus-qt please let me know too.

I've installed FC7 this afternoon and lazarus svn rpm from 20070711 + fpc rpms 
20070711, and there are still problems:
1.Modal windows are not modal.(it worked ok)
2.TStatusBar is not visible (it worked ok until last few days).
3.Mem leaks and AV's  eg. in TQtWSCustomStaticText->GetText() I have to insert 
if csDestroyingHandle in AWinControl.ControlState then exit;
before call to QLabel_text().
(there wasn't any leaks few days ago).

4.This is for Den:
  I cannot work without my bindings patch (QWidgetHack) , even on FC7.
  When I click X button it closes the window, doesn't matter about assigned   
OnCloseQuery(). Your test binary works ok, but same source compiled on my 
shiny new FC7 not. ?!?

This problems are really strange and shows that something is definitelly 
broken, but don't know where , could be fpc , LCL, Qt-4.3 or maybe bindings.




More information about the Qt mailing list