[Qt] new qt patches

zeljko zeljko at holobit.net
Sat Nov 4 21:38:12 CET 2006

On Saturday 04 November 2006 20:09, Felipe Monteiro de Carvalho wrote:
> Thanks, I am having trouble applying your patch. How did you create
> it? The prefered methods are "svn diff > myqtpatch.patch" or using
> Create Patch command from TortoiseSVN .
> This e-mail only arrived 8 hours because it was sent due to some
> problems on the mailling list.
> The following comments you put on the code:
> +  // Sets it´ s initial properties ... do we really need it here ?
> +  QWidget_setGeometry(Widget, AWinControl.Left, AWinControl.Top,
> +   AWinControl.Width, AWinControl.Height);

This comment comes from my thougths about problem founded with ScrollBar and 
TrackBar;), just delete comment if you want.

> Without this the initial position and size of the control will not be
> set. Where else would you put this code?
> +class procedure TQtWSScrollBar.SetParams(const AScrollBar:
> TCustomScrollBar); +var
> +  QtScrollBar: TQtScrollBar;
> +begin
> +  QtScrollBar := TQtScrollBar(AScrollBar.Handle);
> +// TODO: Check HeightForWidth() set here or we have lazarus bug ?
> +// AScrollBar.Width;
> I did not understand this comment. I also don´t know what
> HeightForWidth is suppose to do =)

Ok, I don't know is it LCL problem or not, but my Lazarus version makes 
mistakes with TScrollBar when in vertical position, so I need to hard code in 
my test form in OnShow() event  MyVScrollBar.Width := 16; 
MyVScrollBar.Heigth := 200 and things like that.
Also if U change orientation of TTrackBar from vertical to horizontal or vice 
versa you'll get mess with control. HeigthForWidth is name for function which 
needs to be written (not so hard, but I'm busy with my job at the moment) 
which will set new geometry for qwidget when orientation changed, Height 
becomes Width and Width becomes Height , Left and Top are also changed 
respectively according to new orientation.

More information about the Qt mailing list