4 ms·
I have been doing my GUI programming in Pascal Lazarus was a great crossplatform GUI framework to have a native GUI on each platform. You put a button on a for
by benibela 5y ago
I have been doing my GUI programming in Pascal
Lazarus was a great crossplatform GUI framework to have a native GUI on each platform. You put a button on a form window, and then it calls Win32 on Windows, Gtk on Gnome, Qt on KDE, ... to get their native button.
Unfortunately, it is really lacking maintainers. It still works best on Gtk 2. They have been working on a Gtk 3 version for years. I am not sure if they have been making any progress. I guess the modern way for a Linux GUI is to have a Qt5 version or a Win32 version on WINE.
- jonpalmisc 5y agoI love doing UI programming in Pascal, but I miss sane build systems and package management from other languages when I use Lazarus or Delphi. If Lazarus were more popular and had a better library ecosystem, I’d probably use it a lot more.
- badsectoracula 5y agoFor Lazarus at least you can download and install packages from inside the IDE using the Online Package Manager found in the "Package" menu.
- benibela 5y agoUnfortunately, they seem to have the attitude: we have standard libraries. Any library you need is already bundled with the default install of FPC/Lazarus
- Arnavion 5y agoQt is at Qt6 now, haha.
- lights0123 5y agoQt6 still doesn't have a lot of modules ported to it though, as it really hadn't been around that long.
- jcelerier 5y agosince 6.2 most of the big qt5 modules are ported I believe
- Arnavion 5y agoYes, though qbittorrent at least has moved to it / supports it, which is how I found out about it. After an update it started with a completely different theme, and eventually I realized it had switched to Qt6 and I needed to install the Qt6 version of the theme.
- benibela 5y agoI know, but Lazarus does not support that...
- badsectoracula 5y agoYou can also use the Qt5 backend for Lazarus, AFAIK many people use it instead of Gtk2 despite the latter being the default. One annoyance with that is that you need to either distribute or depend on the qt5pas library which acts as an intermediate between Qt and Free Pascal, but that might not be that big of a problem since AFAIK it is now available in all major distros. About Gtk i'm not sure if it is lack of maintainers or simply lack of interest in the Gtk3+ backends, i remember a discussion from not too long ago in the mailing list where people weren't happy with the breakage introduced by Gtk every major versions. It can be very disheartening to spend years building the Gtk2 backend only to have to make a new one for Gtk3 and before that is finished, out comes Gtk4 breaking things yet again. But IME the Gtk2 backend works fine. At least personally i wouldn't bother with Gtk3 or Gtk4 as these feel like a waste of time now (though personally i did submit a patch recently with fixes for the Gtk1.2 backend[0] that didn't work for some time now :-P but that was mainly for fun - there might be some practical use for it though as all the necessary .so files are like ~2.5MB, so perhaps it could be used for simple GUI apps on Linux to minimize external dependencies). [0] https://i.imgur.com/OM8bC9i.png https://i.imgur.com/OM8bC9i.png
- Arnavion 5y agoOne benefit of GTK3+ is Wayland support, since GTK2 applications only support X11. But most of your Wayland users also run xwayland, so this may not be a big deal for you.