Sign in Join

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

Mailing lists / qt / 2007-01

QT patch

47 messages · 6 people · –

Reply by email Subscribe to this list Your subscription

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

Jesus Reyes

Hi, I'm attaching a patch for qt interface.

This patch makes TStringGrid (and probably other custom controls) to almost work, there are many things yet to be fixed, but I think it's an improvement over the current state.

Sorry for the long patch, I hope it make it to the list. It includes qt4.pas patched from more more recent 4.2.1 bindings from Dean site.

There would be probably many changes that need to be done on the patch, feel free to comment on any aspect of it.

Jesus Reyes A.

__________________________________________________ Correo Yahoo!
Espacio para todos tus mensajes, antivirus y antispam ?gratis! Reg?strate ya - http://correo.yahoo.com.mx/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: qtintf4.diff.gz
Type: application/x-gzip
Size: 23038 bytes
Desc: 755389363-qtintf4.diff.gz
URL: <http://lists.lazarus.freepascal.org/pipermail/qt/attachments/20070105/90bd7405/attachment.bin>

Hess, Philip J
to Jesus Reyes

The patch doesn't work on Windows. I get this error message:

patching file `qtobjects.pas'
Assertion failed: hunk, file patch.c, line 321

This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information.

Looks like a bug in patch.exe on Windows.

It patched okay on OS X, but now my test programs work _worse_ than they did before with the Qt widgetset. On OS X I'm running against Qt 4.1.4. I tried to create a new Qt4Intf library with Den's 1.26 source on OS X, but compiling it gives me a lot of compile errors. Is the interface library code still compatible with 4.1.4 or is it now dependent on 4.2.x (which I haven't built yet on OS X)?

Thanks.

-Phil

Earlier message 32 lines
-----Original Message----- From: on behalf of Jesus Reyes Sent: Fri 1/5/2007 4:18 AM To: QT Lazarus List Subject: [Qt] QT patch Hi, I'm attaching a patch for qt interface. This patch makes TStringGrid (and probably other custom controls) to almost work, there are many things yet to be fixed, but I think it's an improvement over the current state. Sorry for the long patch, I hope it make it to the list. It includes qt4.pas patched from more more recent 4.2.1 bindings from Dean site. There would be probably many changes that need to be done on the patch, feel free to comment on any aspect of it. Jesus Reyes A. __________________________________________________ Correo Yahoo! Espacio para todos tus mensajes, antivirus y antispam ?gratis! Reg?strate ya - http://correo.yahoo.com.mx/ -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/ms-tnef Size: 3370 bytes Desc: not available URL: <http://lists.lazarus.freepascal.org/pipermail/qt/attachments/20070106/6ba6490f/attachment.bin>
Vincent Snijders
to Hess, Philip J
Philip J wrote 9 lines
The patch doesn't work on Windows. I get this error message: patching file `qtobjects.pas' Assertion failed: hunk, file patch.c, line 321 This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information. Looks like a bug in patch.exe on Windows.

Convert the patch to windows line endings before applying it with patch.

Or use cygwin patch, instead of mingw.

Vincent

Jesus Reyes
to Hess, Philip J: The patch doesn't work on Windows. I get this error message: patching file `qtobjects.pas'

--- "Hess, Philip J" escribi?:

Show quoted text 14 lines
The patch doesn't work on Windows. I get this error message: patching file `qtobjects.pas' Assertion failed: hunk, file patch.c, line 321 This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information. Looks like a bug in patch.exe on Windows. It patched okay on OS X, but now my test programs work _worse_ than they did before with the Qt widgetset.

What's worse, Can you be more specific? if possible can you make screenshots?. Can you post your test programs?

Show quoted text 30 lines
On OS X I'm running against Qt 4.1.4. I tried to create a new Qt4Intf library with Den's 1.26 source on OS X, but compiling it gives me a lot of compile errors. Is the interface library code still compatible with 4.1.4 or is it now dependent on 4.2.x (which I haven't built yet on OS X)? Thanks. -Phil -----Original Message----- From: on behalf of Jesus Reyes Sent: Fri 1/5/2007 4:18 AM To: QT Lazarus List Subject: [Qt] QT patch Hi, I'm attaching a patch for qt interface. This patch makes TStringGrid (and probably other custom controls) to almost work, there are many things yet to be fixed, but I think it's an improvement over the current state. Sorry for the long patch, I hope it make it to the list. It includes qt4.pas patched from more more recent 4.2.1 bindings from Dean site.

I'm sorry, it should be Den.

There would be probably many changes that need to be done on the patch, feel free to comment on any aspect of it.

Jesus Reyes A.

__________________________________________________ Correo Yahoo!
Espacio para todos tus mensajes, antivirus y antispam ?gratis! Reg?strate ya - http://correo.yahoo.com.mx/

Hess, Philip J
to Vincent Snijders: Convert the patch to windows line endings before applying it with patch. Or use cygwin…

What program fixes line endings?

The only patch.exe I have on my Windows machine is the one that came with Lazarus.

I have MinGW installed, but it doesn't have a patch utility; I don't have cygwin installed.

Thanks.

-Phil

Earlier message 22 lines
-----Original Message----- From: on behalf of Vincent Snijders Sent: Sat 1/6/2007 2:01 PM To: Items specific to the Qt widget set Subject: Re: [Qt] QT patch Hess, Philip J schreef: > The patch doesn't work on Windows. I get this error message: > > patching file `qtobjects.pas' > Assertion failed: hunk, file patch.c, line 321 > > This application has requested the Runtime to terminate it in an unusual way. > Please contact the application's support team for more information. > > Looks like a bug in patch.exe on Windows. Convert the patch to windows line endings before applying it with patch. Or use cygwin patch, instead of mingw. Vincent
Felipe Monteiro de Carvalho
to Hess, Philip J: The patch doesn't work on Windows. I get this error message: patching file `qtobjects.pas'
Philip J wrote
It patched okay on OS X, but now my test programs work _worse_ than they did before with the Qt widgetset. On OS X I'm running against Qt 4.1.4. I tried to create a new Qt4Intf library with Den's 1.26 source on OS X, but compiling it gives me a lot of compile errors. Is the interface library code still compatible with 4.1.4 or is it now dependent on 4.2.x (which I haven't built yet on OS X)?

Can you test the patch again on Mac OS X ignoring the qt4.pas part of the patch?

You can apply the patch and then substitute qt4.pas from a backup from the current version.

Maybe the new qt4 bindings are the problem.

Felipe Monteiro de Carvalho
Hess, Philip J
to Jesus Reyes: --- "Hess, Philip J" escribi?: What's worse, Can you be more specific? if possible can…

All the labels on the form appear to be overwritten on top of each other, all in the upper left corner of the form.

The rotated labels that previously worked: now nothing appears on form.

Thanks.

-Phil

Earlier message 71 lines
-----Original Message----- From: on behalf of Jesus Reyes Sent: Sat 1/6/2007 2:18 PM To: Items specific to the Qt widget set Subject: RE: [Qt] QT patch --- "Hess, Philip J" escribi?: > The patch doesn't work on Windows. I get this error message: > > patching file `qtobjects.pas' > Assertion failed: hunk, file patch.c, line 321 > > This application has requested the Runtime to terminate it in an > unusual way. > Please contact the application's support team for more > information. > > Looks like a bug in patch.exe on Windows. > > It patched okay on OS X, but now my test programs work _worse_ than > they did before with the Qt widgetset. What's worse, Can you be more specific? if possible can you make screenshots?. Can you post your test programs? > On OS X I'm running against > Qt 4.1.4. I tried to create a new Qt4Intf library with Den's 1.26 > source on OS X, but compiling it gives me a lot of compile errors. > Is the interface library code still compatible with 4.1.4 or is it > now dependent on 4.2.x (which I haven't built yet on OS X)? > > Thanks. > > -Phil > > > > -----Original Message----- > From: on behalf of Jesus Reyes > Sent: Fri 1/5/2007 4:18 AM > To: QT Lazarus List > Subject: [Qt] QT patch > > Hi, I'm attaching a patch for qt interface. > > This patch makes TStringGrid (and probably other custom controls) > to > almost work, there are many things yet to be fixed, but I think > it's > an improvement over the current state. > > Sorry for the long patch, I hope it make it to the list. It > includes > qt4.pas patched from more more recent 4.2.1 bindings from Dean > site. I'm sorry, it should be Den. > > There would be probably many changes that need to be done on the > patch, feel free to comment on any aspect of it. > Jesus Reyes A. __________________________________________________ Correo Yahoo! Espacio para todos tus mensajes, antivirus y antispam ?gratis! Reg?strate ya - http://correo.yahoo.com.mx/
Hess, Philip J
to Felipe Monteiro de Carvalho: Can you test the patch again on Mac OS X ignoring the qt4.pas part of the patch? You can…

Felipe,

The patched Qt units won't compile against the qt4.pas that comes with Lazarus. Must be calling new things added to the interface library.

Thanks.

-Phil

Earlier message 18 lines
-----Original Message----- From: on behalf of Felipe Monteiro de Carvalho Sent: Sat 1/6/2007 3:03 PM To: Items specific to the Qt widget set Subject: Re: [Qt] QT patch On 1/6/07, Hess, Philip J wrote: > It patched okay on OS X, but now my test programs work _worse_ than they did before with the Qt widgetset. On OS X I'm running against Qt 4.1.4. I tried to create a new Qt4Intf library with Den's 1.26 source on OS X, but compiling it gives me a lot of compile errors. Is the interface library code still compatible with 4.1.4 or is it now dependent on 4.2.x (which I haven't built yet on OS X)? Can you test the patch again on Mac OS X ignoring the qt4.pas part of the patch? You can apply the patch and then substitute qt4.pas from a backup from the current version. Maybe the new qt4 bindings are the problem. -- Felipe Monteiro de Carvalho
Hess, Philip J
to Vincent Snijders: The lazarus patch is from fpc, which has it from mingw. I use two text editor, editpad…

I got the patch installed on Windows, but any LCL app compiled with the patched Qt widgetset now gives this error at startup:

"The procedure entry point QVariant_create7 could not be located in libqt4intf.dll."

I'm using Den's latest .dll. Jesus: what version of the interface library are you using?

Thanks.

-Phil

Earlier message 19 lines
-----Original Message----- From: on behalf of Vincent Snijders Sent: Sat 1/6/2007 3:19 PM To: Items specific to the Qt widget set Subject: Re: [Qt] QT patch Hess, Philip J schreef: > What program fixes line endings? > > The only patch.exe I have on my Windows machine is the one that came with Lazarus. > The lazarus patch is from fpc, which has it from mingw. I use two text editor, editpad and textedit, and both can convert the line endings. I think any notepad replacement can do it. Vincent
Jesus Reyes
to Felipe Monteiro de Carvalho: Can you create a new patch that doesn?t update qt bindings? This way we can elliminate…

--- Felipe Monteiro de Carvalho
escribi?:

Show quoted text 10 lines
Hello Jesus Reyes, Can you create a new patch that doesn?t update qt bindings? This way we can elliminate the bindings as a possible source of trouble, and more quickly isolate what is wrong with your patch. thanks, -- Felipe Monteiro de Carvalho

Hi.

Done, I just removed the lines between Index: qt4.pas and Index: qtwidgets.pas.

Jesus Reyes A.

__________________________________________________ Correo Yahoo!
Espacio para todos tus mensajes, antivirus y antispam ?gratis! Reg?strate ya - http://correo.yahoo.com.mx/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: qtintf4-withoutq4pas.diff.gz
Type: application/x-gzip
Size: 17342 bytes
Desc: 3108073147-qtintf4-withoutq4pas.diff.gz
URL: <http://lists.lazarus.freepascal.org/pipermail/qt/attachments/20070106/b399a114/attachment.bin>

Jesus Reyes
to Hess, Philip J: I got the patch installed on Windows, but any LCL app compiled with the patched Qt…

--- "Hess, Philip J" escribi?:

Show quoted text 13 lines
I got the patch installed on Windows, but any LCL app compiled with the patched Qt widgetset now gives this error at startup: "The procedure entry point QVariant_create7 could not be located in libqt4intf.dll." I'm using Den's latest .dll. Jesus: what version of the interface library are you using? Thanks. -Phil

I'm using qt4pas-1.24, I compiled QT 4.2.2 installed in /usr/local/Trolltech/Qt-4.2.2 and I think I also re-compiled libqt4intf.so to include debug information. This is under linux, not tried under any other os.

Jesus Reyes A.

__________________________________________________ Correo Yahoo!
Espacio para todos tus mensajes, antivirus y antispam ?gratis! Reg?strate ya - http://correo.yahoo.com.mx/

Hess, Philip J
to Jesus Reyes

Jesus' original patch changes the shipping Laz qt4.pas to 1.24, so I don't think the issues on OS X are due to the bindings. 1.24 was for Qt 4.1.4, which is what I'm using on OS X. Looks like the patch did something to TLabel perhaps?

On Windows, I don't have the 1.24 .dll and it's not available on Den's site anymore, so I conclude that the current 1.26 .dll I'm using is not compatible with the 1.24 qt4.pas, hence the error message I get there about no QVariant_create7 entry point. I did have the 1.25 dll, but same error message.

Also, on OS X, the TStringGrid displays a little better than before, lots of jagged lines like a child's scribbled drawing. I can see faintly behind the lines the data in the grid, which I never saw before, so some progress here clearly.

Thanks.

-Phil

Earlier message 37 lines
-----Original Message----- From: on behalf of Jesus Reyes Sent: Sat 1/6/2007 5:47 PM To: Items specific to the Qt widget set Subject: RE: [Qt] QT patch --- "Hess, Philip J" escribi?: > I got the patch installed on Windows, but any LCL app compiled with > the patched Qt widgetset now gives this error at startup: > > "The procedure entry point QVariant_create7 could not be located in > libqt4intf.dll." > > I'm using Den's latest .dll. Jesus: what version of the interface > library are you using? > > Thanks. > > -Phil > I'm using qt4pas-1.24, I compiled QT 4.2.2 installed in /usr/local/Trolltech/Qt-4.2.2 and I think I also re-compiled libqt4intf.so to include debug information. This is under linux, not tried under any other os. Jesus Reyes A. __________________________________________________ Correo Yahoo! Espacio para todos tus mensajes, antivirus y antispam ?gratis! Reg?strate ya - http://correo.yahoo.com.mx/
Jesus Reyes
to Hess, Philip J

--- "Hess, Philip J" escribi?:

Show quoted text 5 lines
Jesus' original patch changes the shipping Laz qt4.pas to 1.24, so I don't think the issues on OS X are due to the bindings. 1.24 was for Qt 4.1.4, which is what I'm using on OS X. Looks like the patch did something to TLabel perhaps?

I found the problem, it was using DrawText function of TQtDeviceContext where the painter is rotated and translated, because clipping is working now, it wont work so I eliminated the use of DeviceContext.Origin, instead in SetWindowOrgEx, the painter is translated, this way everything is in place, also GetWindowOrgEx was implemented accordingly.

Check the attached patch.

Show quoted text 11 lines
On Windows, I don't have the 1.24 .dll and it's not available on Den's site anymore, so I conclude that the current 1.26 .dll I'm using is not compatible with the 1.24 qt4.pas, hence the error message I get there about no QVariant_create7 entry point. I did have the 1.25 dll, but same error message. Also, on OS X, the TStringGrid displays a little better than before, lots of jagged lines like a child's scribbled drawing. I can see faintly behind the lines the data in the grid, which I never saw before, so some progress here clearly.

oh, if you could make a screen shot and post it somewhere would be much appreciated.

Show quoted text 57 lines
Thanks. -Phil -----Original Message----- From: on behalf of Jesus Reyes Sent: Sat 1/6/2007 5:47 PM To: Items specific to the Qt widget set Subject: RE: [Qt] QT patch --- "Hess, Philip J" escribi?: > I got the patch installed on Windows, but any LCL app compiled with > the patched Qt widgetset now gives this error at startup: > > "The procedure entry point QVariant_create7 could not be located in > libqt4intf.dll." > > I'm using Den's latest .dll. Jesus: what version of the interface > library are you using? > > Thanks. > > -Phil > I'm using qt4pas-1.24, I compiled QT 4.2.2 installed in /usr/local/Trolltech/Qt-4.2.2 and I think I also re-compiled libqt4intf.so to include debug information. This is under linux, not tried under any other os. Jesus Reyes A. __________________________________________________ Correo Yahoo! Espacio para todos tus mensajes, antivirus y antispam ?gratis! Reg?strate ya - http://correo.yahoo.com.mx/ _______________________________________________ Qt mailing list http://www.lazarus.freepascal.org/mailman/listinfo/qt > _______________________________________________ Qt mailing list http://www.lazarus.freepascal.org/mailman/listinfo/qt

__________________________________________________ Correo Yahoo!
Espacio para todos tus mensajes, antivirus y antispam ?gratis! Reg?strate ya - http://correo.yahoo.com.mx/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: qtintf5.diff.gz
Type: application/x-gzip
Size: 18100 bytes
Desc: 3543674552-qtintf5.diff.gz
URL: <http://lists.lazarus.freepascal.org/pipermail/qt/attachments/20070106/7892e060/attachment.bin>

Jesus Reyes
to Jesus Reyes

--- Jesus Reyes escribi?:

Show quoted text 39 lines
--- "Hess, Philip J" escribi?: > Jesus' original patch changes the shipping Laz qt4.pas to 1.24, so > I don't think the issues on OS X are due to the bindings. 1.24 was > for Qt 4.1.4, which is what I'm using on OS X. Looks like the patch > did something to TLabel perhaps? > I found the problem, it was using DrawText function of TQtDeviceContext where the painter is rotated and translated, because clipping is working now, it wont work so I eliminated the use of DeviceContext.Origin, instead in SetWindowOrgEx, the painter is translated, this way everything is in place, also GetWindowOrgEx was implemented accordingly. Check the attached patch. > On Windows, I don't have the 1.24 .dll and it's not available on > Den's site anymore, so I conclude that the current 1.26 .dll I'm > using is not compatible with the 1.24 qt4.pas, hence the error > message I get there about no QVariant_create7 entry point. I did > have the 1.25 dll, but same error message. > > Also, on OS X, the TStringGrid displays a little better than > before, lots of jagged lines like a child's scribbled drawing. I > can see faintly behind the lines the data in the grid, which I > never saw before, so some progress here clearly. > oh, if you could make a screen shot and post it somewhere would be much appreciated.

This is what it looks here http://imagebin.org/6846 some previous screenshots:
http://mx.geocities.com/jesusrmx/lazarus/images/lazqtcustomcontrol.png http://mx.geocities.com/jesusrmx/lazarus/images/lazqtcustomcontrol1.png

the button covering by the custom control is intentional to force some redraws on it.

btw I forgot, I didn't implement rotated text yet and the patch includes some comments that I should have deleted.

Show quoted text 65 lines
> > Thanks. > > -Phil > > > > -----Original Message----- > From: on behalf of Jesus Reyes > Sent: Sat 1/6/2007 5:47 PM > To: Items specific to the Qt widget set > Subject: RE: [Qt] QT patch > > > --- "Hess, Philip J" escribi?: > > > I got the patch installed on Windows, but any LCL app compiled > with > > the patched Qt widgetset now gives this error at startup: > > > > "The procedure entry point QVariant_create7 could not be located > in > > libqt4intf.dll." > > > > I'm using Den's latest .dll. Jesus: what version of the interface > > library are you using? > > > > Thanks. > > > > -Phil > > > > > I'm using qt4pas-1.24, I compiled QT 4.2.2 installed in > /usr/local/Trolltech/Qt-4.2.2 and I think I also re-compiled > libqt4intf.so to include debug information. This is under linux, > not > tried under any other os. > > Jesus Reyes A. > > > > __________________________________________________ > Correo Yahoo! > Espacio para todos tus mensajes, antivirus y antispam ?gratis! > Reg?strate ya - http://correo.yahoo.com.mx/ > _______________________________________________ > Qt mailing list > > http://www.lazarus.freepascal.org/mailman/listinfo/qt > > > _______________________________________________ > Qt mailing list > > http://www.lazarus.freepascal.org/mailman/listinfo/qt > __________________________________________________ Correo Yahoo! Espacio para todos tus mensajes, antivirus y antispam ?gratis! Reg?strate ya - http://correo.yahoo.com.mx/ >
Felipe Monteiro de Carvalho
to Jesus Reyes

ok, WOW, this is a huge patch.

Let?s start:

1 - TQtDCData=record

What is that? What is that suppose to do?

Why not simply pass the DeviceContext object around instead?

2 - You changed TQtGroupBox.Create to TQtGroupBox.CreateWidget

What is the idea behind that change? Which repeats on several classes.

---

Can you explain with more details what the patch does?

thanks,

Felipe Monteiro de Carvalho
Hess, Philip J
to Jesus Reyes: --- "Hess, Philip J" escribi?: I found the problem, it was using DrawText function of…

Jesus,

That fixed the TLabel somewhat, although AutoSize doesn't seem to work (label chopped off) and some of my rotated labels are getting chopped off even though their AutoSize is False. These worked fine with the Laz shipping Qt files.

Also this bug that was also there today and wasn't affected by the latest patch:

- Dialog box with TGroupBox crashes app.

Also, the 1.24 qt4.pas is required to compile the patches, so I would revert your patch back to include it.

Thanks.

-Phil

Earlier message 111 lines
-----Original Message----- From: on behalf of Jesus Reyes Sent: Sat 1/6/2007 7:20 PM To: Items specific to the Qt widget set Subject: RE: [Qt] QT patch --- "Hess, Philip J" escribi?: > Jesus' original patch changes the shipping Laz qt4.pas to 1.24, so > I don't think the issues on OS X are due to the bindings. 1.24 was > for Qt 4.1.4, which is what I'm using on OS X. Looks like the patch > did something to TLabel perhaps? > I found the problem, it was using DrawText function of TQtDeviceContext where the painter is rotated and translated, because clipping is working now, it wont work so I eliminated the use of DeviceContext.Origin, instead in SetWindowOrgEx, the painter is translated, this way everything is in place, also GetWindowOrgEx was implemented accordingly. Check the attached patch. > On Windows, I don't have the 1.24 .dll and it's not available on > Den's site anymore, so I conclude that the current 1.26 .dll I'm > using is not compatible with the 1.24 qt4.pas, hence the error > message I get there about no QVariant_create7 entry point. I did > have the 1.25 dll, but same error message. > > Also, on OS X, the TStringGrid displays a little better than > before, lots of jagged lines like a child's scribbled drawing. I > can see faintly behind the lines the data in the grid, which I > never saw before, so some progress here clearly. > oh, if you could make a screen shot and post it somewhere would be much appreciated. > > Thanks. > > -Phil > > > > -----Original Message----- > From: on behalf of Jesus Reyes > Sent: Sat 1/6/2007 5:47 PM > To: Items specific to the Qt widget set > Subject: RE: [Qt] QT patch > > > --- "Hess, Philip J" escribi?: > > > I got the patch installed on Windows, but any LCL app compiled > with > > the patched Qt widgetset now gives this error at startup: > > > > "The procedure entry point QVariant_create7 could not be located > in > > libqt4intf.dll." > > > > I'm using Den's latest .dll. Jesus: what version of the interface > > library are you using? > > > > Thanks. > > > > -Phil > > > > > I'm using qt4pas-1.24, I compiled QT 4.2.2 installed in > /usr/local/Trolltech/Qt-4.2.2 and I think I also re-compiled > libqt4intf.so to include debug information. This is under linux, > not > tried under any other os. > > Jesus Reyes A. > > > > __________________________________________________ > Correo Yahoo! > Espacio para todos tus mensajes, antivirus y antispam ?gratis! > Reg?strate ya - http://correo.yahoo.com.mx/ > _______________________________________________ > Qt mailing list > > http://www.lazarus.freepascal.org/mailman/listinfo/qt > > > _______________________________________________ > Qt mailing list > > http://www.lazarus.freepascal.org/mailman/listinfo/qt > __________________________________________________ Correo Yahoo! Espacio para todos tus mensajes, antivirus y antispam ?gratis! Reg?strate ya - http://correo.yahoo.com.mx/ -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/ms-tnef Size: 4258 bytes Desc: not available URL: <http://lists.lazarus.freepascal.org/pipermail/qt/attachments/20070106/7d8c8177/attachment.bin>
Jesus Reyes
to Felipe Monteiro de Carvalho: ok, WOW, this is a huge patch. Let?s start: 1 - TQtDCData=record What is that? What is…

--- Felipe Monteiro de Carvalho
escribi?:

Show quoted text 10 lines
ok, WOW, this is a huge patch. Let?s start: 1 - TQtDCData=record What is that? What is that suppose to do? Why not simply pass the DeviceContext object around instead?

I did this before I discovered qpainter_save and qpainter_restore, it's supposed to be removed or improved, it depends if qpainter_save and restore can handle all selcteable objects in dc. the ones are commened at the end of struct. That was to implement SaveDC and RestoreDC API functions.

2 - You changed TQtGroupBox.Create to TQtGroupBox.CreateWidget What is the idea behind that change? Which repeats on several classes.

It's needed so all TQtWidgets can have an common constructor that is called for all descendants, so it does common setup, in this patch it's necesary to support qobject_setproperty, this is to make a map between the underlaying qt widget and our API handle.

In this way we can ask qt for the focused widget, it will respond with a QWidgetH object, before the patch there was no way to know to what handle (TQtWidget) that widget corresponded.

It also eliminated many duplicated code.

--- Can you explain with more details what the patch does?

The patch is big, because it implements or fixes many things that didn't work in qt interface, like clipping, regions, brushes, pens, colors, fixed amounts of leaks, corrected mouse coordinates, etc.

As there are many things, I don't know where to start, if you could ask in the way you did above for specific things would be easier to me.

thanks, -- Felipe Monteiro de Carvalho

Jesus Reyes A.

__________________________________________________ Correo Yahoo!
Espacio para todos tus mensajes, antivirus y antispam ?gratis! Reg?strate ya - http://correo.yahoo.com.mx/

Jesus Reyes
to Hess, Philip J: That fixed the TLabel somewhat, although AutoSize doesn't seem to work (label chopped…

--- "Hess, Philip J" escribi?:

Show quoted text 6 lines
Jesus, That fixed the TLabel somewhat, although AutoSize doesn't seem to work (label chopped off) and some of my rotated labels are getting chopped off even though their AutoSize is False. These worked fine with the Laz shipping Qt files.

The Laz shipping Qt files didn't support everything, as the missing support is being added some features would seem are not working, this is normal because simply I cannot test everything. I could miss something a flag here of there, I would need test projects to advance on completing the missing support and at the same time to try not breake things.

Also the patch is large, many things were changed. I think first it should be approved in general, I don't see the point in continuing to add features if current structure and methods are not likely to match everybody's idea of qt interface improving.

Show quoted text 6 lines
Also this bug that was also there today and wasn't affected by the latest patch: - Dialog box with TGroupBox crashes app.

I will take a look, but see my last comment above.

Show quoted text 7 lines
Also, the 1.24 qt4.pas is required to compile the patches, so I would revert your patch back to include it. Thanks. -Phil

So, what are the recommended versions of bindings and library for all os? considering that shipped lazarus bindings should be upgraded.

I'm new to Den Jean releasing of bindings and I might have misunderstood something. If I got it right 1.24 is stable and 1.25 is beta I choose stable and I haven't find any problem with my qt4.2.2 library at least under linux (though I don't really remember if 1.25 was out when I started).

Jesus Reyes A.

Show quoted text 117 lines
-----Original Message----- From: on behalf of Jesus Reyes Sent: Sat 1/6/2007 7:20 PM To: Items specific to the Qt widget set Subject: RE: [Qt] QT patch --- "Hess, Philip J" escribi?: > Jesus' original patch changes the shipping Laz qt4.pas to 1.24, so > I don't think the issues on OS X are due to the bindings. 1.24 was > for Qt 4.1.4, which is what I'm using on OS X. Looks like the patch > did something to TLabel perhaps? > I found the problem, it was using DrawText function of TQtDeviceContext where the painter is rotated and translated, because clipping is working now, it wont work so I eliminated the use of DeviceContext.Origin, instead in SetWindowOrgEx, the painter is translated, this way everything is in place, also GetWindowOrgEx was implemented accordingly. Check the attached patch. > On Windows, I don't have the 1.24 .dll and it's not available on > Den's site anymore, so I conclude that the current 1.26 .dll I'm > using is not compatible with the 1.24 qt4.pas, hence the error > message I get there about no QVariant_create7 entry point. I did > have the 1.25 dll, but same error message. > > Also, on OS X, the TStringGrid displays a little better than > before, lots of jagged lines like a child's scribbled drawing. I > can see faintly behind the lines the data in the grid, which I > never saw before, so some progress here clearly. > oh, if you could make a screen shot and post it somewhere would be much appreciated. > > Thanks. > > -Phil > > > > -----Original Message----- > From: on behalf of Jesus Reyes > Sent: Sat 1/6/2007 5:47 PM > To: Items specific to the Qt widget set > Subject: RE: [Qt] QT patch > > > --- "Hess, Philip J" escribi?: > > > I got the patch installed on Windows, but any LCL app compiled > with > > the patched Qt widgetset now gives this error at startup: > > > > "The procedure entry point QVariant_create7 could not be located > in > > libqt4intf.dll." > > > > I'm using Den's latest .dll. Jesus: what version of the interface > > library are you using? > > > > Thanks. > > > > -Phil > > > > > I'm using qt4pas-1.24, I compiled QT 4.2.2 installed in > /usr/local/Trolltech/Qt-4.2.2 and I think I also re-compiled > libqt4intf.so to include debug information. This is under linux, > not > tried under any other os. > > Jesus Reyes A. > > > > __________________________________________________ > Correo Yahoo! > Espacio para todos tus mensajes, antivirus y antispam ?gratis! > Reg?strate ya - http://correo.yahoo.com.mx/ > _______________________________________________ > Qt mailing list > > http://www.lazarus.freepascal.org/mailman/listinfo/qt > > > _______________________________________________ > Qt mailing list > > http://www.lazarus.freepascal.org/mailman/listinfo/qt > __________________________________________________ Correo Yahoo! Espacio para todos tus mensajes, antivirus y antispam ?gratis! Reg?strate ya - http://correo.yahoo.com.mx/ > _______________________________________________ Qt mailing list http://www.lazarus.freepascal.org/mailman/listinfo/qt

__________________________________________________ Correo Yahoo!
Espacio para todos tus mensajes, antivirus y antispam ?gratis! Reg?strate ya - http://correo.yahoo.com.mx/

Hess, Philip J
to Jesus Reyes

I would suggest we use 1.26 since the 1.24 qt4.pas doesn't work with the currently posted libqt4intf.dll (1.26) on Windows.

However, the 1.26 qt4.pas doesn't seem to want to compile against 4.1.4 so I'm building Qt 4.2.1 tonight and will test it tomorrow. If it works okay I'll send Den a new Qt4Intf framework to post.

Compiling your patched Qt units with the 1.26 qt4.pas fixed some of the problems I was seeing with FPC 2.1.1 on Windows (but not all), so maybe the problem is not with FPC 2.1.1.

Thanks.

-Phil

Earlier message 179 lines
-----Original Message----- From: on behalf of Jesus Reyes Sent: Sat 1/6/2007 9:07 PM To: Items specific to the Qt widget set Subject: RE: [Qt] QT patch --- "Hess, Philip J" escribi?: > Jesus, > > That fixed the TLabel somewhat, although AutoSize doesn't seem to > work (label chopped off) and some of my rotated labels are getting > chopped off even though their AutoSize is False. These worked fine > with the Laz shipping Qt files. The Laz shipping Qt files didn't support everything, as the missing support is being added some features would seem are not working, this is normal because simply I cannot test everything. I could miss something a flag here of there, I would need test projects to advance on completing the missing support and at the same time to try not breake things. Also the patch is large, many things were changed. I think first it should be approved in general, I don't see the point in continuing to add features if current structure and methods are not likely to match everybody's idea of qt interface improving. > > Also this bug that was also there today and wasn't affected by the > latest patch: > > - Dialog box with TGroupBox crashes app. > I will take a look, but see my last comment above. > Also, the 1.24 qt4.pas is required to compile the patches, so I > would revert your patch back to include it. > > Thanks. > > -Phil > So, what are the recommended versions of bindings and library for all os? considering that shipped lazarus bindings should be upgraded. I'm new to Den Jean releasing of bindings and I might have misunderstood something. If I got it right 1.24 is stable and 1.25 is beta I choose stable and I haven't find any problem with my qt4.2.2 library at least under linux (though I don't really remember if 1.25 was out when I started). Jesus Reyes A. > > -----Original Message----- > From: on behalf of Jesus Reyes > Sent: Sat 1/6/2007 7:20 PM > To: Items specific to the Qt widget set > Subject: RE: [Qt] QT patch > > > --- "Hess, Philip J" escribi?: > > > Jesus' original patch changes the shipping Laz qt4.pas to 1.24, > so > > I don't think the issues on OS X are due to the bindings. 1.24 > was > > for Qt 4.1.4, which is what I'm using on OS X. Looks like the > patch > > did something to TLabel perhaps? > > > > I found the problem, it was using DrawText function of > TQtDeviceContext where the painter is rotated and translated, > because > clipping is working now, it wont work so I eliminated the use of > DeviceContext.Origin, instead in SetWindowOrgEx, the painter is > translated, this way everything is in place, also GetWindowOrgEx > was > implemented accordingly. > > Check the attached patch. > > > > On Windows, I don't have the 1.24 .dll and it's not available on > > Den's site anymore, so I conclude that the current 1.26 .dll I'm > > using is not compatible with the 1.24 qt4.pas, hence the error > > message I get there about no QVariant_create7 entry point. I did > > have the 1.25 dll, but same error message. > > > > Also, on OS X, the TStringGrid displays a little better than > > before, lots of jagged lines like a child's scribbled drawing. I > > can see faintly behind the lines the data in the grid, which I > > never saw before, so some progress here clearly. > > > > oh, if you could make a screen shot and post it somewhere would be > much appreciated. > > > > > Thanks. > > > > -Phil > > > > > > > > -----Original Message----- > > From: on behalf of Jesus Reyes > > Sent: Sat 1/6/2007 5:47 PM > > To: Items specific to the Qt widget set > > Subject: RE: [Qt] QT patch > > > > > > --- "Hess, Philip J" escribi?: > > > > > I got the patch installed on Windows, but any LCL app compiled > > with > > > the patched Qt widgetset now gives this error at startup: > > > > > > "The procedure entry point QVariant_create7 could not be > located > > in > > > libqt4intf.dll." > > > > > > I'm using Den's latest .dll. Jesus: what version of the > interface > > > library are you using? > > > > > > Thanks. > > > > > > -Phil > > > > > > > > > I'm using qt4pas-1.24, I compiled QT 4.2.2 installed in > > /usr/local/Trolltech/Qt-4.2.2 and I think I also re-compiled > > libqt4intf.so to include debug information. This is under linux, > > not > > tried under any other os. > > > > Jesus Reyes A. > > > > > > > > __________________________________________________ > > Correo Yahoo! > > Espacio para todos tus mensajes, antivirus y antispam ?gratis! > > Reg?strate ya - http://correo.yahoo.com.mx/ > > _______________________________________________ > > Qt mailing list > > > > http://www.lazarus.freepascal.org/mailman/listinfo/qt > > > > > _______________________________________________ > > Qt mailing list > > > > http://www.lazarus.freepascal.org/mailman/listinfo/qt > > > > > __________________________________________________ > Correo Yahoo! > Espacio para todos tus mensajes, antivirus y antispam ?gratis! > Reg?strate ya - http://correo.yahoo.com.mx/ > > > _______________________________________________ > Qt mailing list > > http://www.lazarus.freepascal.org/mailman/listinfo/qt > __________________________________________________ Correo Yahoo! Espacio para todos tus mensajes, antivirus y antispam ?gratis! Reg?strate ya - http://correo.yahoo.com.mx/
Hess, Philip J
to Den Jean

Den,

The 1.26 qt4.pas won't compile against my 1.24 Qt4Intf. And I can't build a 1.26 Qt4Intf against my 4.1.4 QtCore and QtGui. Does it now require Qt 4.2.x?

Also, bad news from the Qt front: I tried to build the 4.2.1 QtCore and QtGui, but Trolltech's make failed after about 3 hours of compiling. It built the QtCore but not QtGui.

Looks like I'm for now (1.24).

Thanks.

-Phil

Earlier message 9 lines
-----Original Message----- From: on behalf of Den Jean Sent: Sun 1/7/2007 10:19 AM To: Items specific to the Qt widget set Subject: Re: [Qt] QT patch On Sunday 07 January 2007 00:43, Hess, Philip J wrote: > On Windows, I don't have the 1.24 .dll and it's not available on Den's site restored now.
Den Jean
to Hess, Philip J
Philip J wrote 5 lines
Den, The 1.26 qt4.pas won't compile against my 1.24 Qt4Intf. And I can't build a 1.26 Qt4Intf against my 4.1.4 QtCore and QtGui. Does it now require Qt 4.2.x?

the libraries should always be used with the corresponding qt4.pas.

Also, bad news from the Qt front: I tried to build the 4.2.1 QtCore and QtGui, but Trolltech's make failed after about 3 hours of compiling. It built the QtCore but not QtGui.

try Qt 4.2.2.
After the configure phase, scroll a bit up to see if there are many "no's" -> install some devel packages if necessary.

Show quoted text 23 lines
Looks like I'm for now (1.24). Thanks. -Phil -----Original Message----- From: on behalf of Den Jean Sent: Sun 1/7/2007 10:19 AM To: Items specific to the Qt widget set Subject: Re: [Qt] QT patch On Sunday 07 January 2007 00:43, Hess, Philip J wrote: > On Windows, I don't have the 1.24 .dll and it's not available on Den's > site restored now. _______________________________________________ Qt mailing list http://www.lazarus.freepascal.org/mailman/listinfo/qt
zeljko
to Hess, Philip J: The 1.26 qt4.pas won't compile against my 1.24 Qt4Intf. And I can't build a 1.26 Qt4Intf…
Philip J wrote 9 lines
Den, The 1.26 qt4.pas won't compile against my 1.24 Qt4Intf. And I can't build a 1.26 Qt4Intf against my 4.1.4 QtCore and QtGui. Does it now require Qt 4.2.x? Also, bad news from the Qt front: I tried to build the 4.2.1 QtCore and QtGui, but Trolltech's make failed after about 3 hours of compiling. It built the QtCore but not QtGui.

humm..I've recompiled 4.2.2 w/o any problem yesterday (gcc 3.3.6 and 4.1.1), and it works ok with bindings 1.26.

Hess, Philip J
to zeljko

I looked through Trolltech's FAQs and found this workaround for my problem:

http://www.trolltech.com/developer/knowledgebase/faq.2006-11-29.49921167 73/

I'll try their workaround this week.

Thanks.

-Phil

Earlier message 24 lines
-----Original Message----- From: [mailto:] On Behalf Of zeljko Sent: Monday, January 08, 2007 3:25 AM To: Items specific to the Qt widget set Subject: Re: [Qt] QT patch On Sunday 07 January 2007 20:08, Hess, Philip J wrote: > Den, > > The 1.26 qt4.pas won't compile against my 1.24 Qt4Intf. And I can't build a > 1.26 Qt4Intf against my 4.1.4 QtCore and QtGui. Does it now require Qt > 4.2.x? > > Also, bad news from the Qt front: I tried to build the 4.2.1 QtCore and > QtGui, but Trolltech's make failed after about 3 hours of compiling. It > built the QtCore but not QtGui. humm..I've recompiled 4.2.2 w/o any problem yesterday (gcc 3.3.6 and 4.1.1), and it works ok with bindings 1.26.
Hess, Philip J
to Jesus Reyes: --- "Hess, Philip J" escribi?: I found the problem, it was using DrawText function of…

Jesus,

I attached a screenshot showing what the TStringGrid looks like on OS X, but it was held up awaiting "moderator approval". This was two days ago. Is there anyone moderating this list?

Thanks.

-Phil

Earlier message 103 lines
-----Original Message----- From: [mailto:] On Behalf Of Jesus Reyes Sent: Saturday, January 06, 2007 7:21 PM To: Items specific to the Qt widget set Subject: RE: [Qt] QT patch --- "Hess, Philip J" escribi?: > Jesus' original patch changes the shipping Laz qt4.pas to 1.24, so > I don't think the issues on OS X are due to the bindings. 1.24 was > for Qt 4.1.4, which is what I'm using on OS X. Looks like the patch > did something to TLabel perhaps? > I found the problem, it was using DrawText function of TQtDeviceContext where the painter is rotated and translated, because clipping is working now, it wont work so I eliminated the use of DeviceContext.Origin, instead in SetWindowOrgEx, the painter is translated, this way everything is in place, also GetWindowOrgEx was implemented accordingly. Check the attached patch. > On Windows, I don't have the 1.24 .dll and it's not available on > Den's site anymore, so I conclude that the current 1.26 .dll I'm > using is not compatible with the 1.24 qt4.pas, hence the error > message I get there about no QVariant_create7 entry point. I did > have the 1.25 dll, but same error message. > > Also, on OS X, the TStringGrid displays a little better than > before, lots of jagged lines like a child's scribbled drawing. I > can see faintly behind the lines the data in the grid, which I > never saw before, so some progress here clearly. > oh, if you could make a screen shot and post it somewhere would be much appreciated. > > Thanks. > > -Phil > > > > -----Original Message----- > From: on behalf of Jesus Reyes > Sent: Sat 1/6/2007 5:47 PM > To: Items specific to the Qt widget set > Subject: RE: [Qt] QT patch > > > --- "Hess, Philip J" escribi?: > > > I got the patch installed on Windows, but any LCL app compiled > with > > the patched Qt widgetset now gives this error at startup: > > > > "The procedure entry point QVariant_create7 could not be located > in > > libqt4intf.dll." > > > > I'm using Den's latest .dll. Jesus: what version of the interface > > library are you using? > > > > Thanks. > > > > -Phil > > > > > I'm using qt4pas-1.24, I compiled QT 4.2.2 installed in > /usr/local/Trolltech/Qt-4.2.2 and I think I also re-compiled > libqt4intf.so to include debug information. This is under linux, > not > tried under any other os. > > Jesus Reyes A. > > > > __________________________________________________ > Correo Yahoo! > Espacio para todos tus mensajes, antivirus y antispam ?gratis! > Reg?strate ya - http://correo.yahoo.com.mx/ > _______________________________________________ > Qt mailing list > > http://www.lazarus.freepascal.org/mailman/listinfo/qt > > > _______________________________________________ > Qt mailing list > > http://www.lazarus.freepascal.org/mailman/listinfo/qt > __________________________________________________ Correo Yahoo! Espacio para todos tus mensajes, antivirus y antispam ?gratis! Reg?strate ya - http://correo.yahoo.com.mx/
Felipe Monteiro de Carvalho
to Hess, Philip J
Philip J wrote
I attached a screenshot showing what the TStringGrid looks like on OS X, but it was held up awaiting "moderator approval". This was two days ago. Is there anyone moderating this list?

In theory if there is a moderator, it should be me. In practice, maybe Michael Hess is set as moderator.

Can you upload the image somewhere else? There are some image pastebins around ...

thanks,

Felipe Monteiro de Carvalho
Felipe Monteiro de Carvalho
to Jesus Reyes: --- "Hess, Philip J" escribi?: The Laz shipping Qt files didn't support everything, as…
Jesus Reyes wrote
Also the patch is large, many things were changed. I think first it should be approved in general, I don't see the point in continuing to add features if current structure and methods are not likely to match everybody's idea of qt interface improving.

umm ... the problem is that the patch is too large, and cannot be separated. I tryed to separate the qt4.pas part, but it can?t be compiled without it.

About the general idea of the patch, I agree with it, but I also think it needs a little more work. Specifically:

* Can you investigate substituting TQtDCData with qpainter_save and qpainter_restore?

That would take a lot of code from the patch.

* It would be nice if rotated text works again. Regressions aren?t good.

thanks,

Felipe Monteiro de Carvalho
Jesus Reyes
to Felipe Monteiro de Carvalho

--- Felipe Monteiro de Carvalho
escribi?:

Show quoted text 12 lines
On 1/7/07, Jesus Reyes wrote: > Also the patch is large, many things were changed. I think first it > should be approved in general, I don't see the point in continuing to > add features if current structure and methods are not likely to match > everybody's idea of qt interface improving. umm ... the problem is that the patch is too large, and cannot be separated. I tryed to separate the qt4.pas part, but it can?t be compiled without it.

you are right. I will try to comment on the patch in a separated message.

I was using 1.24 and now 1.26, for 1.26 just a little change is necessary, because QVariant_create(cardinal) has disappeared however QVariant_toUInt() is still there, in the new patch I', using QVariant_create(int64) probably also QVariant_create(integer) could be used, but after that it 4.2.2 with 1.26 seems working right. Will update the shortly.

Show quoted text 7 lines
About the general idea of the patch, I agree with it, but I also think it needs a little more work. Specifically: * Can you investigate substituting TQtDCData with qpainter_save and qpainter_restore?

Currently qpainter_save and qpainter_restore is used, the code using TQtDCData is commented, I think it could be elimintaded without problems. If necesary it could be added later.

That would take a lot of code from the patch.
* It would be nice if rotated text works again. Regressions aren?t good.

:) I don't like regressions also, but as I said in other message, it could be great if test cases are provided and if we have some of them before commiting the patch it would be even best.

Btw I found other problem in TQtMainWindow.SetTabOrders, if there is only one control in a groupbox for example, after tabbing with keyword application freeze, I will include a fix in the next patch.

thanks, -- Felipe Monteiro de Carvalho

Jesus Reyes A.

__________________________________________________ Correo Yahoo!
Espacio para todos tus mensajes, antivirus y antispam ?gratis! Reg?strate ya - http://correo.yahoo.com.mx/

Felipe Monteiro de Carvalho
to Jesus Reyes
Jesus Reyes wrote
:) I don't like regressions also, but as I said in other message, it could be great if test cases are provided and if we have some of them before commiting the patch it would be even best.

Philip, can you create a test application for rotated texts?

thanks,

Felipe Monteiro de Carvalho
Hess, Philip J
to Felipe Monteiro de Carvalho

Felipe,

Actually, there's a test project, TestRLbl, included with the Orpheus port:

http://web.fastermac.net/~MacPgmr/OrphPort/OrphStatus.html

This worked on OS X with the Laz Qt widgetset files, but not with the patched Qt widgetset. I tried it just now on Windows and the app crashed at startup, but I think this is the problem I have with some Qt apps compiled with FPC 2.1.1.

Thanks.

-Phil

Earlier message 19 lines
-----Original Message----- From: [mailto:] On Behalf Of Felipe Monteiro de Carvalho Sent: Monday, January 08, 2007 4:37 PM To: Items specific to the Qt widget set Subject: Re: [Qt] QT patch On 1/8/07, Jesus Reyes wrote: > :) I don't like regressions also, but as I said in other message, it > could be great if test cases are provided and if we have some of them > before commiting the patch it would be even best. Philip, can you create a test application for rotated texts? thanks, -- Felipe Monteiro de Carvalho
Den Jean
to Hess, Philip J
Philip J wrote
at startup, but I think this is the problem I have with some Qt apps compiled with FPC 2.1.1.

I just tried with fpc 2.0.4 and fpc 2.1.1 on linux before going to windows.

problems there too, so I will first look further on linux

did anyone tried the test program on linux too ?

The qt4.pas in subversion is still V1.21. It would be nice if it would be updated.

I replaced it locally with 1.26, used the V1.26 libqtint and qt 4.2.2

regards,

Den Jean

Jesus Reyes
to Hess, Philip J: Actually, there's a test project, TestRLbl, included with the Orpheus port:…

--- "Hess, Philip J" escribi?:

Show quoted text 17 lines
Felipe, Actually, there's a test project, TestRLbl, included with the Orpheus port: http://web.fastermac.net/~MacPgmr/OrphPort/OrphStatus.html This worked on OS X with the Laz Qt widgetset files, but not with the patched Qt widgetset. I tried it just now on Windows and the app crashed at startup, but I think this is the problem I have with some Qt apps compiled with FPC 2.1.1. Thanks.

I don't know, I think it would be best to write specific test cases, something that can be run in a standard lazarus without installing additional components.

Maybe, This (I have to ask first) can be included in lazarus as part of some visual inspection test suite that helps to test other platforms and other widgetsets. I don't know, later we could get a table listing test against widgetsets for reference.

The other problem I have is that under gtk the TextRLbl test (I was lucky that I had orph installed) does not work, I don't know how it should look. If you have delphi screenshots it could help, maybe we can hit two birds with the same shot and we fix gtk 1 also.

Jesus Reyes A.

__________________________________________________ Correo Yahoo!
Espacio para todos tus mensajes, antivirus y antispam ?gratis! Reg?strate ya - http://correo.yahoo.com.mx/

Felipe Monteiro de Carvalho
to Jesus Reyes

Here is test code for a rotated text app (put on a app with only 1 form and no controls on it):

function CreateRotatedFont(F : TFont; Angle : Integer) : hFont;
 {-create a rotated font based on the font object F}
var
 LF : TLogFont;
begin
 FillChar(LF, SizeOf(LF), #0);
 with LF do begin
   lfHeight           := F.Height;
   lfWidth            := 0;
   lfEscapement       := Angle*10;
   lfOrientation      := 0;
   if fsBold in F.Style then
     lfWeight         := FW_BOLD
   else
     lfWeight         := FW_NORMAL;
   lfItalic           := Byte(fsItalic in F.Style);
   lfUnderline        := Byte(fsUnderline in F.Style);
   lfStrikeOut        := Byte(fsStrikeOut in F.Style);
   lfCharSet          := DEFAULT_CHARSET;
   StrPCopy(lfFaceName, F.Name);
   lfQuality          := DEFAULT_QUALITY;
   {everything else as default}
   lfOutPrecision     := OUT_DEFAULT_PRECIS;
   lfClipPrecision    := CLIP_DEFAULT_PRECIS;
   case F.Pitch of
     fpVariable : lfPitchAndFamily := VARIABLE_PITCH;
     fpFixed    : lfPitchAndFamily := FIXED_PITCH;
   else
     lfPitchAndFamily := DEFAULT_PITCH;
   end;
 end;
 Result := CreateFontIndirect(LF);
end;
procedure TForm2.FormCreate(Sender: TObject);
begin
 MyFont := CreateRotatedFont(Canvas.Font, 45);
end;
procedure TForm2.FormPaint(Sender: TObject);
begin
 SelectObject(Canvas.Handle, MyFont);
 Canvas.TextOut(200, 200, 'Texto para ser escrito');
end;
Felipe Monteiro de Carvalho
Hess, Philip J
to Jesus Reyes: --- "Hess, Philip J" escribi?: I don't know, I think it would be best to write specific…

Jesus,

I've attached a screenshot of what TestRLbl test app looks like with Lazarus on Windows. Delphi looks identical.

By rights, Lazarus should include tests for all standard widgets. I've found that a good way to test is simply to run large apps against a widgetset. This introduces the element of the unexpected, something that small tests apps often don't, and exercises the widgets in a "real-world" setting.

Thanks.

-Phil

Earlier message 47 lines
-----Original Message----- From: [mailto:] On Behalf Of Jesus Reyes Sent: Tuesday, January 09, 2007 2:34 AM To: Items specific to the Qt widget set Subject: RE: [Qt] QT patch --- "Hess, Philip J" escribi?: > Felipe, > > Actually, there's a test project, TestRLbl, included with the > Orpheus > port: > > http://web.fastermac.net/~MacPgmr/OrphPort/OrphStatus.html > > This worked on OS X with the Laz Qt widgetset files, but not with > the > patched Qt widgetset. I tried it just now on Windows and the app > crashed > at startup, but I think this is the problem I have with some Qt > apps > compiled with FPC 2.1.1. > > Thanks. I don't know, I think it would be best to write specific test cases, something that can be run in a standard lazarus without installing additional components. Maybe, This (I have to ask first) can be included in lazarus as part of some visual inspection test suite that helps to test other platforms and other widgetsets. I don't know, later we could get a table listing test against widgetsets for reference. The other problem I have is that under gtk the TextRLbl test (I was lucky that I had orph installed) does not work, I don't know how it should look. If you have delphi screenshots it could help, maybe we can hit two birds with the same shot and we fix gtk 1 also. Jesus Reyes A. __________________________________________________ Correo Yahoo! Espacio para todos tus mensajes, antivirus y antispam ?gratis! Reg?strate ya - http://correo.yahoo.com.mx/
Hess, Philip J
to Den Jean: the libraries should always be used with the corresponding qt4.pas. try Qt 4.2.2. After…

Den,

4.2.2 built successfully overnight once I applied Trolltech's workaround of "downgrading" QuickTime. Funny that Qt would conflict with QT (QuickTime).

I'll test it tonight and send you an updated .dmg installer for the 1.26 Qt4Intf library.

Thanks.

-Phil

Earlier message 50 lines
-----Original Message----- From: [mailto:] On Behalf Of Den Jean Sent: Sunday, January 07, 2007 2:33 PM To: Items specific to the Qt widget set Subject: Re: [Qt] QT patch On Sunday 07 January 2007 20:08, Hess, Philip J wrote: > Den, > > The 1.26 qt4.pas won't compile against my 1.24 Qt4Intf. And I can't build a > 1.26 Qt4Intf against my 4.1.4 QtCore and QtGui. Does it now require Qt > 4.2.x? the libraries should always be used with the corresponding qt4.pas. > > Also, bad news from the Qt front: I tried to build the 4.2.1 QtCore and > QtGui, but Trolltech's make failed after about 3 hours of compiling. It > built the QtCore but not QtGui. try Qt 4.2.2. After the configure phase, scroll a bit up to see if there are many "no's" -> install some devel packages if necessary. > > Looks like I'm for now (1.24). > > Thanks. > > -Phil > > > -----Original Message----- > From: on behalf of Den Jean > Sent: Sun 1/7/2007 10:19 AM > To: Items specific to the Qt widget set > Subject: Re: [Qt] QT patch > > On Sunday 07 January 2007 00:43, Hess, Philip J wrote: > > On Windows, I don't have the 1.24 .dll and it's not available on Den's > > site > > restored now. > _______________________________________________ > Qt mailing list > > http://www.lazarus.freepascal.org/mailman/listinfo/qt
Jesus Reyes
to Felipe Monteiro de Carvalho: Here is test code for a rotated text app (put on a app with only 1 form and no controls…

--- Felipe Monteiro de Carvalho
escribi?:

Show quoted text 50 lines
Here is test code for a rotated text app (put on a app with only 1 form and no controls on it): function CreateRotatedFont(F : TFont; Angle : Integer) : hFont; {-create a rotated font based on the font object F} var LF : TLogFont; begin FillChar(LF, SizeOf(LF), #0); with LF do begin lfHeight := F.Height; lfWidth := 0; lfEscapement := Angle*10; lfOrientation := 0; if fsBold in F.Style then lfWeight := FW_BOLD else lfWeight := FW_NORMAL; lfItalic := Byte(fsItalic in F.Style); lfUnderline := Byte(fsUnderline in F.Style); lfStrikeOut := Byte(fsStrikeOut in F.Style); lfCharSet := DEFAULT_CHARSET; StrPCopy(lfFaceName, F.Name); lfQuality := DEFAULT_QUALITY; {everything else as default} lfOutPrecision := OUT_DEFAULT_PRECIS; lfClipPrecision := CLIP_DEFAULT_PRECIS; case F.Pitch of fpVariable : lfPitchAndFamily := VARIABLE_PITCH; fpFixed : lfPitchAndFamily := FIXED_PITCH; else lfPitchAndFamily := DEFAULT_PITCH; end; end; Result := CreateFontIndirect(LF); end; procedure TForm2.FormCreate(Sender: TObject); begin MyFont := CreateRotatedFont(Canvas.Font, 45); end; procedure TForm2.FormPaint(Sender: TObject); begin SelectObject(Canvas.Handle, MyFont); Canvas.TextOut(200, 200, 'Texto para ser escrito'); end;

Thanks, I made some experiments, see the attached screenshot. I yet don't know what is supposed to be the right result, I have little experience with rotated text, and a screenshot was not provided :P

What is the right result, the upper or the lower, I would think the upper one but the code in DC.DrawText draws the lower one.

Jesus Reyes A.

__________________________________________________ Correo Yahoo!
Espacio para todos tus mensajes, antivirus y antispam ?gratis! Reg?strate ya - http://correo.yahoo.com.mx/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lazqtrotatedtext.png
Type: image/png
Size: 10919 bytes
Desc: 2836318157-lazqtrotatedtext.png
URL: <http://lists.lazarus.freepascal.org/pipermail/qt/attachments/20070109/7736acab/attachment.png>

Jesus Reyes
to Felipe Monteiro de Carvalho

--- Felipe Monteiro de Carvalho
escribi?:

Show quoted text 12 lines
I thougth it would be nice to post this here. Jesus's patch has just being applied. Thanks Jesus. -- Felipe Monteiro de Carvalho _______________________________________________ Qt mailing list http://www.lazarus.freepascal.org/mailman/listinfo/qt

Two things, I forget to remove some debug output, done in r10497. I should have made the patch so it updates to bindings 1.26, I was testing 1.24 and forgot to made the change.

Should I commit a patch to update to bindings 1.26?

Jesus Reyes A.

___________________________________________________________ Do You Yahoo!?
La mejor conexi?n a Internet y <b >2GB</b> extra a tu correo por $100 al mes. http://net.yahoo.com.mx -------------- next part --------------
A non-text attachment was scrubbed...
Name: qtintf10.diff.gz
Type: application/x-gzip
Size: 29355 bytes
Desc: 2778312705-qtintf10.diff.gz
URL: <http://lists.lazarus.freepascal.org/pipermail/qt/attachments/20070122/7dfda452/attachment.bin>

Felipe Monteiro de Carvalho
to Jesus Reyes
Jesus Reyes wrote
Two things, I forget to remove some debug output, done in r10497. I should have made the patch so it updates to bindings 1.26, I was testing 1.24 and forgot to made the change.

If you have commit rights to qt folder, yes, please apply the patch.

thanks,

Felipe Monteiro de Carvalho
Jesus Reyes
to zeljko

--- zeljko escribi?:

Show quoted text 15 lines
On Tuesday 23 January 2007 01:52, Felipe Monteiro de Carvalho wrote: All raises AV on application start (compiles fine) TStaticText doesn't work TCheckBox doesn't work TRadioButton doesn't work TStatusBar doesn't work ... maybe others too ... _______________________________________________ Qt mailing list http://www.lazarus.freepascal.org/mailman/listinfo/qt

fixed some in r10503, can you check again? The StatusBar simpletext at handle creating needs review though.

Jesus Reyes A.

___________________________________________________________ Do You Yahoo!?
La mejor conexi?n a Internet y <b >2GB</b> extra a tu correo por $100 al mes. http://net.yahoo.com.mx

zeljko
to Jesus Reyes
Jesus Reyes wrote
fixed some in r10503, can you check again? The StatusBar simpletext at handle creating needs review though.

I've seen your fix, but there is better way to do it if we need to setText() of control while creating ...
I've fixed such creation in different way ... like this (eg. TQtCheckBox).

function TQtCheckBox.CreateWidget(const AParams: TCreateParams): QWidgetH;
var
  Str: WideString;
  Parent: QWidgetH;
begin
  // Creates the widget
  {$ifdef VerboseQt}
    WriteLn('TQtCheckBox.Create');
  {$endif}
  Str := UTF8Decode(LCLObject.Caption);
  if (LCLObject.Parent is TCustomCheckGroup) then
  begin
    Result := QCheckBox_create(@Str); // <- Set text immediatelly
    QLayout_addWidget(TQtGroupBox(LCLObject.Parent.Handle).VBoxLayout,
Result);
  end
  else
  begin
    Parent := TQtWidget(LCLObject.Parent.Handle).Widget;
    Result := QCheckBox_create(@Str,Parent); // <- Set text immediatelly
//    inherited SetGeometry;
  end;
  // SetText(@Str);
end;

cheers

Jesus Reyes
to zeljko

--- zeljko escribi?:

Show quoted text 10 lines
On Thursday 25 January 2007 00:16, Jesus Reyes wrote: > fixed some in r10503, can you check again? The StatusBar simpletext > at handle creating needs review though. I've seen your fix, but there is better way to do it if we need to setText() of control while creating ... I've fixed such creation in different way ... like this (eg. TQtCheckBox).

Do this have some purpose?, because the text is set anyway in InitializeWND.

Show quoted text 33 lines
function TQtCheckBox.CreateWidget(const AParams: TCreateParams): QWidgetH; var Str: WideString; Parent: QWidgetH; begin // Creates the widget {$ifdef VerboseQt} WriteLn('TQtCheckBox.Create'); {$endif} Str := UTF8Decode(LCLObject.Caption); if (LCLObject.Parent is TCustomCheckGroup) then begin Result := QCheckBox_create(@Str); // <- Set text immediatelly QLayout_addWidget(TQtGroupBox(LCLObject.Parent.Handle).VBoxLayout, Result); end else begin Parent := TQtWidget(LCLObject.Parent.Handle).Widget; Result := QCheckBox_create(@Str,Parent); // <- Set text immediatelly // inherited SetGeometry; end; // SetText(@Str); end; cheers

Jesus Reyes A.

___________________________________________________________ Do You Yahoo!?
La mejor conexi?n a Internet y <b >2GB</b> extra a tu correo por $100 al mes. http://net.yahoo.com.mx

zeljko
to Jesus Reyes
Jesus Reyes wrote 16 lines
--- zeljko escribi?: > On Thursday 25 January 2007 00:16, Jesus Reyes wrote: > > fixed some in r10503, can you check again? The StatusBar > > simpletext > > > at handle creating needs review though. > > I've seen your fix, but there is better way to do it if we need to > setText() > of control while creating ... > I've fixed such creation in different way ... like this (eg. > TQtCheckBox). Do this have some purpose?, because the text is set anyway in InitializeWND.

nope, just to stay with current source ;)