Lazarus 1.9 trunk Qt4 and Qt5 interface (screenshots)


Hi there,

Just a small status update here. In the past months I ‘ported’ our full company application from Delphi 2010 to Lazarus (now 2.0 RC2 and FPC 3.2.0 fixes). This 80,000 line program now almost fully correctly works as 32 and 64bit program on Windows 7, Windows 10, Linux x86 Ubuntu 16.04, Linux x64 Ubuntu 18.04, ARM 32bit linux, and (drum roll) Haiku x86 (still a pre-beta1 nightly build).

It cost me some 4-5 months to complete this task, and I then needed one or two days to get the Haiku version going.
This application controls our measuring device via a serial or USB port. This device is a GC (gas chromatograph) that measures (non-)toxic gases in air in various setups.

The program runs under widgesets:
Qt4, Qt5, Gtk2, Win32. Gtk3 also runs, but barely (still alpha support with lazarus).
All versions compiled on Windows 7 or Windows 10 x64 with Fpcupdeluxe, and all the needed cross compilers. Note that targeting Haiku did not work with 32bit version Lazarus, but is does work with the 64bit lazarus version on Windows.
On haiku I have two non-functioning parts as far as I have seen upto now:
-Indy10 does not link (but does compile)
-TAChart does not link (but does compile).

So I disabeled those two parts.

Please note this application is a MDI application, which I mimic on non-Qt targets (But only fullscreen ‘child’ forms, though win32 also windowed). Official windowed childs work with Qt4 and 5.

I had to patch two things:

  • For haiku serial port support (I use synaser) I needed to patch a few files (See earlier in this discussion).
  • For Qt4 and 5 there’s an error in LCL/interfaces/Qt(5) where mouse positions are incorrectly reported in MDI childforms that are: -non-fullscreen and/or -contain a menu. I have a small patch for that that fixes this.
    I tested Haiku, Linux and Windows all needing this patch.

I am attaching some screenshots of this application to this message.

I must say that I am very impressed with Lazarus/FPC!

And with Haiku as well, I am very proud to see this application (on which I am working for 6+ years fulltime now) on my favorite OS and of course I am demonstrating this to my colleagues every now and then…
With a big smile on my face :slight_smile:



Haiku_runs_GC955_1 Haiku_runs_GC955_2


Awesome !!! Your app only lacks a dedicated Haiku icon :wink:

Congratulations for the good work! :beers:



True, we still need a Icon, never got to it :slight_smile:
BTW, I was demoing this software including OS running of a 1Gb bootable Haiku stick… It’s easy to generate a ‘service stick’ this way with which you can normally run the app, but also run our hardware testing/debugging software tool which I ‘ported’ earlier.

Who knows what the future holds… :sunglasses:


Older Lazarus assemblies do not work in the new Haiku because of the Qt5 library update.
Need rebuild Qt5Pas/Qt4Pas library.
Links to last may build lazarus for Haiku in my blog



Nice to see Lazarus again on Haiku, I must try that again as well :grinning:
Anyhow, you are correct for Qt5, I rebuilt the pascal bindings for it for my project on Linux and Windows.
Qt4 however did not change compared to Lazarus 1.9, at least my project keeps on working with it :slight_smile:
I did not yet build the bindings for Haiku myself, but My lazarus 1.9 and 2.0RC2 builds both work with Qt4 there.

Ah, you mean it the other way around I think (after reading the text again…) I’ll try that. If you have the updated Qt5 and Qt4 bindings available I’ll try them indeed on Beta1!


Not everyone knows that you can enable Lazarus IDE in single-window mode (docking mode). This mode works great in haiku with lazarus qt4.



New build Lazarus 1.8.4 qt4 with dpi and path patches and some Haiku artworks.

Now you can run directly startlazarus from menu (not in terminal)



good work @s40in :+1:


Standard warning about downloading packages/binaries from some site on the internet applies. People may want to consider waiting until/if the package becomes available as a HaikuPorts recipe and then HaikuDepot.


I do not plan to do this in the near future.


Is the build system so error-prone/hacky?


Did not quite understand the question?

It is advisable to keep Lazarus in the folder with write access . If you add components to the lazarus, then Lazarus rebuild himself.


Small tips for Lazarus Qt4 and other qt4 software:
Install fonts DejaVu. Qt4 apps will looks better.

Qt4 port for Haiku set DejaVu fonts in libQt4:

Q_GUI_EXPORT const char *qt_fontFamilyFromStyleHint(const QFontDef &request)
    const char *family = 0;
    switch (request.styleHint) {
    case QFont::Helvetica:
        family = "DejaVu Sans";


@s40in@rudolfc i use machine win10 64bit…and have newpascal on it (laz distribution) how to crosscompile to haiku? have you any reference to setup it?


I have never used newpascal and crosscompilation.
Try to build the program in Lazarus for Haiku.


i see… thanks for your reply @s40in


Hi, you can install fpcupdeluxe-x86_64-win64: this is a helper program with which you can install lazarus, fpc, and all the cross compilers automatically at most.
You install LAzarus/FPC with it and after that select the Haiku cross compiler: that will install it for use from within LAzarus. You can select your project target there, for Haiku set x86 cpu, Haiku and Qt4 or Qt5 as the widgeset. Apart from possible missing items you need for haiku (pascal binding file, possibly a tweak as I mentioned once for serial port support for instance) it will work ‘right out of the box’.

At least, that’s my experience :slight_smile:

Oh, don’t use the 32bit version of fpcupdeluxe: that did not work for me as fas as the Haiku target is concerned. Also please note that Haiku 64bit is not yet supported…

It might be best BTW to uninstall your current Lazarus first, and then use the helper file. It’s kind of a guard or shield around lazarus itself. Don’t know if it would interact OK with a seperately done lazarus install…


thanks @rudolfc … i’ll try your suggestion