[Gambas-devel] QT 4.0 is out!

Brandon Bergren bdragon at ...185...
Wed Jun 29 00:48:21 CEST 2005


And I've been slogging through gb.qt, trying to get it to compile.

I'm running into quite a few problems. (To be expected, of course.)

Perhaps having seperate plugins for QT3 and QT4 would be a good idea?


Does anyone have plans yet?  It would be a good chance to clean up gb.qt.

If nobody else is interested in porting gb.qt right now, I'll probabaly 
end up doing one. (as part of the Windows porting stuff.)

Here's some of my thoughts.

What I'm doing (The nontraditional build...):
(Shell is msys's bash from my mingw install)
(Don't try this at home.)
1. Dump the sources and gambas.h in a directory.
2. Run qt3to4 on everything.
3. qmake -project
4. Edit the .pro and add QT += qt3support.
5. qmake
6. make
7. Hack the living hell out of the code until it compiles.


Major things I ran into so far:

1. CContainer is a mess, due to these two changes:

--children() and QueryList now return a QObjectList instead of a pointer 
to a QObjectList.

--In Qt 3, the QObjectList class was a typedef for QPtrList<QObject>. In 
Qt 4, it is a typedef for QList<QObject *>.

I hacked it into submission, but it is not pretty. I think a total rewrite 
of this class in the QT4 way would be the way to go.

2. CDraw and anything else that touches a Painter needs rewritten for 
Arthur (QT4's painting engine.)

One example: You can't define the clipping in the constructor anymore.
Another example: Raster ops are somewhere else now... (haven't looked into 
this...)

I haven't figured out how to go about this yet.

3. It won't compile without quite a bit of elbow grease.

4. Would be nice to compile without QT3Support ;)

Minor things:

1. The DPI stuff in the CFont class needs rewritten for QT4.

2. The gb.qt code needs cleanup in some places. (even before my attacking 
it with a text editor. ;)

3. It will be awhile before QT4 is widespread. I need to use it, though, 
because it's the first GPL'd Windows release.

4. QT4's main window classes are redesigned. Would be nice to take 
advantage of them.

Good things:

1. I'm really liking the new QT API. :)

2. Arthur kicks ass. Really and truly.
Read http://doc.trolltech.com/4.0/qt4-arthur.html for more information. :)





More information about the Devel mailing list