Sign in Join

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

Mailing lists / qt / 2009-05

Packaging of qt4-lib for FPC/Laz developers

7 messages · 5 people ·

Reply by email Subscribe to this list Your subscription

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

Vincent Snijders

Now with correct address of qt list...

Mazen Neifer wrote 9 lines
Hi Matthias, I think there is already a port of QT binding in Lazarus. I've located the file lazrus/lcl/interfaces/qt/qt44.pas which seems to provide an interface for qtlib. In order to save effort, I propose to collaborate together with the maintainer of this file and put this in fpc/packages/qt.

Please, don't mix the pascal headers from interfaces/qt/qt44.pas with the c++/c bridge from Den.

There are several layers:

4. [ qtint.pas ] -> main unit of the Lazarus qt interface calls
3. [ qt4.pas ] -> pascal headers for libqtinf4 (in 4.3, 4.4, 4.5 flavor) calls
2. [ libqtintf4 ] -> a c++ / c library to flatten the c++ qt core libs calls
1. [ qt core libs ] <- created by TrollTech

1. is available in most distroes
2. is created by Den Jean and packaged by Matthias
3. is distributed with Lazarus, but can be moved to fpc/packages/qt in the future
4. is part of Lazarus: the LCL interface with QT.

Vincent

C.C. to qt list to get input from lazarus qt maintainers

Matthias Klumpp

Hi Mazen!
The necessary headers for Qt4 are already included in Lazarus. The library I packaged is some kind of a Qt4 wrapper which makes the C++ Qt functions usable for Lazarus/Pascal.
Every application which uses Qt4 and which is produced with Lazarus/Pascal depends on this package. It is no proper solution if everyone has to include the library into his/her own package which needs reconfiguring of the library paths and may make it impossible to install another package which also contains the libqt4intf.so. Because of that it would be nice if the library is in the repositories of the Linux distributions. (As Vincent already explained)

Matthias

Mazen Neifer wrote 16 lines
Hi Matthias, I think there is already a port of QT binding in Lazarus. I've located the file lazrus/lcl/interfaces/qt/qt44.pas which seems to provide an interface for qtlib. In order to save effort, I propose to collaborate together with the maintainer of this file and put this in fpc/packages/qt. Cheers, Mazen, Le mercredi 27 mai 2009 ? 22:11 +0200, Matthias Klumpp a ?crit : > Hello! > My name is Matthias Klumpp, I'm developer for various Linux applications > which are made using FPC and Lazarus. I'm als very active in building

new

Show quoted text 11 lines
> Debian packages for Ubuntu, especially the GetDeb-Portal. > Some members of the German Lazarus forum asked me a long time ago if I > could package the libqt4intf.so library ( > http://users.telenet.be/Jan.Van.hijfte/qtforfpc/fpcqt4.html ) for > Debian/Ubuntu to make it easier to create Lazarus for Qt4. > Because I'm not an Ubuntu/Debian maintainer yet, I submitted the package > sources to REVU and my PPA. > The package is now waiting for a long time to be included into Ubuntu. > Yesterday I got an mail from a Lazarus-Forum meber, who asked me about > the > packaging progress and who made the suggestion to partner with you to

get

Show quoted text 9 lines
> the package into Debian, because you're responsible for the Lazarus/FPC > packages in Debian. > Would it be possible to include my libqt4intf-package into Debian > unstable? > Otherwise I have to wait for at least two MOTUs to review my package. > This > may take nearly three months. The complete sources of the package are > available at REVU: http://revu.ubuntuwire.com/p/libqtintf4 > All lintian errors/warnings are fixed, proper patchfiles are included

and

Show quoted text 12 lines
> everything is working fine on Ubuntu. > It would be great if you could include this library to make it possible > for > other Pascal developers to build their applications with Qt4. > Because my package completely depends on MOTUs who have enough time to > review it, I'm not sure if the library would reach Ubuntu's universe > repos > for the next release. > I'm looking forward to hear from you! > Best regards, > Matthias Klumpp >
Mazen Neifer
to Matthias Klumpp

Matthias,

The proper solution will be to move it to FPC repository and package it in fp-units-qt4 just like fp-units-gtk2, no?

Does anyone complain about this?

Mazen,

Le jeudi 28 mai 2009 ? 14:58 +0200, Matthias Klumpp a ?crit :

Show quoted text 68 lines
Hi Mazen! The necessary headers for Qt4 are already included in Lazarus. The library I packaged is some kind of a Qt4 wrapper which makes the C++ Qt functions usable for Lazarus/Pascal. Every application which uses Qt4 and which is produced with Lazarus/Pascal depends on this package. It is no proper solution if everyone has to include the library into his/her own package which needs reconfiguring of the library paths and may make it impossible to install another package which also contains the libqt4intf.so. Because of that it would be nice if the library is in the repositories of the Linux distributions. (As Vincent already explained) Matthias On Thu, 28 May 2009 10:21:54 +0200, Mazen Neifer wrote: > Hi Matthias, > > I think there is already a port of QT binding in Lazarus. I've located > the file lazrus/lcl/interfaces/qt/qt44.pas which seems to provide an > interface for qtlib. > > In order to save effort, I propose to collaborate together with the > maintainer of this file and put this in fpc/packages/qt. > > Cheers, > Mazen, > > Le mercredi 27 mai 2009 ? 22:11 +0200, Matthias Klumpp a ?crit : >> Hello! >> My name is Matthias Klumpp, I'm developer for various Linux applications >> which are made using FPC and Lazarus. I'm als very active in building new >> Debian packages for Ubuntu, especially the GetDeb-Portal. >> Some members of the German Lazarus forum asked me a long time ago if I >> could package the libqt4intf.so library ( >> http://users.telenet.be/Jan.Van.hijfte/qtforfpc/fpcqt4.html ) for >> Debian/Ubuntu to make it easier to create Lazarus for Qt4. >> Because I'm not an Ubuntu/Debian maintainer yet, I submitted the package >> sources to REVU and my PPA. >> The package is now waiting for a long time to be included into Ubuntu. >> Yesterday I got an mail from a Lazarus-Forum meber, who asked me about >> the >> packaging progress and who made the suggestion to partner with you to get >> the package into Debian, because you're responsible for the Lazarus/FPC >> packages in Debian. >> Would it be possible to include my libqt4intf-package into Debian >> unstable? >> Otherwise I have to wait for at least two MOTUs to review my package. >> This >> may take nearly three months. The complete sources of the package are >> available at REVU: http://revu.ubuntuwire.com/p/libqtintf4 >> All lintian errors/warnings are fixed, proper patchfiles are included and >> everything is working fine on Ubuntu. >> It would be great if you could include this library to make it possible >> for >> other Pascal developers to build their applications with Qt4. >> Because my package completely depends on MOTUs who have enough time to >> review it, I'm not sure if the library would reach Ubuntu's universe >> repos >> for the next release. >> I'm looking forward to hear from you! >> Best regards, >> Matthias Klumpp >>
Matthias Klumpp
to Mazen Neifer

The wrapper library can also be used from non-pascal applications. Otherwise it is completely written in C++ and not an official part of FPC (?).
So maybe it would make more sense to create an independent package, I think.

(But there may also be some advantages in making libqt4intf.so part of the official FPC - pleas ask the developer of Qt4FPC abou this) Cheers
Matthias

Mazen Neifer wrote 8 lines
Matthias, The proper solution will be to move it to FPC repository and package it in fp-units-qt4 just like fp-units-gtk2, no? Does anyone complain about this? Mazen,
Vincent Snijders
to Matthias Klumpp
Matthias Klumpp wrote 6 lines
The wrapper library can also be used from non-pascal applications. Otherwise it is completely written in C++ and not an official part of FPC (?). So maybe it would make more sense to create an independent package, I think.

I agree.

Vincent

Show quoted text 18 lines
(But there may also be some advantages in making libqt4intf.so part of the official FPC - pleas ask the developer of Qt4FPC abou this) Cheers Matthias On Thu, 28 May 2009 18:09:01 +0200, Mazen Neifer wrote: > Matthias, > > The proper solution will be to move it to FPC repository and package it > in fp-units-qt4 just like fp-units-gtk2, no? > > Does anyone complain about this? > > Mazen, _______________________________________________ core site list http://idefix.wisa.be/mailman/listinfo/core
Den Jean
to Vincent Snijders
Vincent Snijders wrote
Matthias Klumpp schreef: > The wrapper library can also be used from non-pascal applications.

No .... Unlike the obsolete QtC library, this library tries to be pascal friendly. Hence, certain pascal data types are used.

E.g. to avoid the use of QStrings, functions with a QString as parameter are changed into functions with Pascal WideString parameters. As C++/C does not know how to create/fill this pascal type, the C++/C library is initialized with pascal functions to do this.

See InitPWideStrings at very bottom of qt4.pas:
-> provision of pascal function to C++/C library.

> Otherwise it is completely written in C++ and not an official part of FPC > (?). > So maybe it would make more sense to create an independent package, I > think.

The binding is far from complete, only the classes necessary for Lazarus were done. Furthermore there is no integration with Qt Dialog Editing. So perhaps it is not that useful for fpc itself.

For lazarus it is very helpful as it provides a very large cross platform capability with native look capabilities on every platform (Windows/Windows XP/Windows Vista, Mac, Linux Qt, Linux Embedded. Qt now also supports Windows Embedded and S60 Embedded, I just didn't do the bindings yet, as I do not have any device :-;

http://www.youtube.com/watch?v=Qhba1lhBllM&feature=channel_page

Qt can also look like Gtk or Motif (and CDE, CleanStyle).

http://doc.qtsoftware.com/4.5/qstyle.html#details

Show quoted text 6 lines
I agree. Vincent > (But there may also be some advantages in making libqt4intf.so part of > the official FPC - pleas ask the developer of Qt4FPC abou this)

I do not mind, but Makefile (c or pascal) are not my cup of tea, but it would certainly improve distribution inclusion. Now everyone complains of ... ld cannot find -lqt4intf ...

Show quoted text 5 lines
>> The proper solution will be to move it to FPC repository and package it >> in fp-units-qt4 just like fp-units-gtk2, no? >> >> Does anyone complain about this? >>

noop

kind regards,

Den Jean

A.J. Venter
to Den Jean
kind regards, Den Jean

It may help here to point out what I did on kongoni. Lazarus by default compiles with the GTK widget set. However there is a seperate port for the qt4pas package, which properly builds, and if it's there
- lazarus will build with a QT interface (and LCL) instead.

Thus the user can easily choose by simply deciding whether or not to install qt4pas first.

Ciao
A.J.

A.J. Venter Tel.: +27 21 554 5059 Fax: +27 11 252 9197 Outkast Solutions IT www.outkastsolutions.co.za A division of Global Pact Trading Pty Ltd. www.silentcoder.co.za - Blog scartoonz.silentcoder.co.za - ScarToonz webcomic