[Lazarus] Problems linking with QT4
Darius Blaszyk
dhkblaszyk at zeelandnet.nl
Mon Nov 3 14:21:14 CET 2008
I've posted source for a simple library that can be compiled with
Lazarus into a Python module:
http://web.fastermac.net/~MacPgmr/Lazarus/PyGuiMod_20081102.zip
This library also includes a form that can be displayed by calling a
library function from Python.
Typically you would be using Python as a scripting language within a
larger host application, for example using Python to develop plugins
for the host app. By putting existing Pascal code and forms into a
module library, you can then use your Pascal code with the host app
(and not rewrite it all in C++, say).
Many apps take a Henry Ford approach to plugins (Ford famously
declared that customers could buy a Model T in any color they wanted
as long as it was black) - that is, you can develop plugins in
whatever language the app developers used (usually C++) or had in
mind (Python once they realize that hardly anyone is developing any
plugins). This is a workaround for that limitation.
You can test the compiled module with the included test.py script,
but to really see how cool this is, install Quantum GIS
(www.qgis.org), then load the included Python plugin (myplugin.py)
and run the form from it.
Tested with:
- Delphi 7 and 10
- Lazarus 0.9.26 on Windows
- Lazarus 0.9.26 on OS X (PowerPC, Carbon widgetset).
Thanks.
-Phil
More information about the Lazarus
mailing list