Lazarus 1.9 trunk Qt4 and Qt5 interface (screenshots)


#61

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:

Bye!

Rudolf.

Haiku_runs_GC955_1 Haiku_runs_GC955_2


#62

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

Congratulations for the good work! :beers:


#63

Hi,

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:


#64

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

lazarus2rc3_haiku_%D0%981_20181220


#65

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!


#66

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

screenshot2


#67

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

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

screenshot3


#68

good work @s40in :+1:


#69

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.


#70

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


#71

Is the build system so error-prone/hacky?


#72

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.


#73

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";
        break;