Sign in Join

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

Mailing lists / qt / 2006-11

new qt patches

7 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

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

zeljko

I have to resend this mail (sended this morning) because it seem that qt mailing list doesn't work. Anyway here is LCL qt update.

Attached:

TQtAbstractSlider
TQtScrollBar
TQtTrackBar

TQtPen
CreatePenIndirect (winapi)
TQtRegion
CreateRectRgn (winapi)

Added 2 new procs into TQtWidget class,
setWidth and setHeight.

Patch attached.

cheers
zac

-------------- next part --------------
A non-text attachment was scrubbed...
Name: qtintfs.patch
Type: text/x-diff
Size: 30827 bytes
Desc: not available
URL: <http://lists.lazarus.freepascal.org/pipermail/qt/attachments/20061104/dc0e365e/attachment.bin>

Felipe Monteiro de Carvalho
to zeljko: Attached: TQtAbstractSlider TQtScrollBar TQtTrackBar TQtPen CreatePenIndirect (winapi)…

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);

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 =)

Felipe Monteiro de Carvalho
zeljko
to Felipe Monteiro de Carvalho
Felipe Monteiro de Carvalho wrote 12 lines
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.

Show quoted text 13 lines
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.

zeljko
to Felipe Monteiro de Carvalho: Thanks, I am having trouble applying your patch. How did you create it? The prefered…
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 .

I'm always using diff -Nau originalcode newcode > diff.patch

you can patch it (if you are in qt sources directory) with patch -p1 < newpatch.patch

Show quoted text 23 lines
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); 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 =)
Felipe Monteiro de Carvalho
to zeljko: This comment comes from my thougths about problem founded with ScrollBar and TrackBar;),…
zeljko wrote
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.

I've seen this on Gtk interface. So it's probably a LCL bug. It's reported on the lazarus bug tracker.

Felipe Monteiro de Carvalho
Felipe Monteiro de Carvalho
to zeljko: I'm always using diff -Nau originalcode newcode > diff.patch you can patch it (if you are…

Thank you very much, applied.

I did some minor modifications, such as fix identation and removed a with statement (I think they dimish readability, and lazarus debugger cannot handle them well).

I removed the first comment, but kept the second because there probably is a LCL bug.

Is your name already on the Lazarus contributors list? If not, what is your full name?

thanks,

Felipe Monteiro de Carvalho