Recent

Author Topic: GTK or QT?  (Read 4672 times)

Leledumbo

  • Hero Member
  • *****
  • Posts: 8386
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: GTK or QT?
« Reply #15 on: September 17, 2021, 01:55:42 pm »
When making cross platform apps, I usually prefer each platform's native interface, if they have one. If they have two, well, provide two :P
As long as you adhere to LCL Autosize / Layout, meaning you're not doing any absolute sizing / layouting, any backend should show similarly well laid out controls.

bitman

  • Newbie
  • Posts: 3
Re: GTK or QT?
« Reply #16 on: September 18, 2021, 10:57:58 pm »
A quick update...

I ultimately had to go with GTK, because of this:

https://forum.lazarus.freepascal.org/index.php/topic,48275.15.html

https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/36483

The IDE code editor is unusable in certain versions of QT. Fonts are a real mess, making impossible to do any work; nothing else mattered. Supposedly there is some patch, but didn't know exactly how to apply it, while the problem is absent in GTK... so, there's that  :sighs:

Jurassic Pork

  • Hero Member
  • *****
  • Posts: 1053
Re: GTK or QT?
« Reply #17 on: September 19, 2021, 08:23:36 am »
hello,
GTK2 is now EOL and  newer  GTK linux distribution versions use GTK3 by default.
On Ubuntu 20.04 LTS i have a project for image processing. When i use gtk2 as LCL widgetset i have some error messages at run time :
Quote
Gtk-Message: 13:32:49.621: Failed to load module "canberra-gtk-module"
GLib-GObject-WARNING **: 13:32:51.031: ../../../gobject/gsignal.c:1282: no emission of signal "key-release-event" to stop for instance '0x2628350'
Read this topic: GTK2 is now EOL :(   

Friendly, J.P
Jurassic computer : Sinclair ZX81 - Zilog Z80A à 3,25 MHz - RAM 1 Ko - ROM 8 Ko

dbannon

  • Hero Member
  • *****
  • Posts: 1591
    • tomboy-ng, a rewrite of the classic Tomboy
Re: GTK or QT?
« Reply #18 on: September 21, 2021, 12:14:57 pm »
I ultimately had to go with GTK, because of this:
(a font problem in the IDE)

I suspect that you believe you have to use the same widget set in the ide that your application uses ?   That is not the case, absolutely no reason why you cannot have a GTK2 based IDE and produce (and test, debug, everything) a QT5 app.  Mixing does not make any part of the process any harder once you have selected QT5 Widgetset in ProjectOptions.  Normally, for a cross platform app, you will define in your project a mode for GTK2, QT5, Windows, MacOS, perhaps Raspberry Pi and maybe GTK3 (?).

Indeed, that same GTK2 IDE (as long as you have setup FPC cross compilers) will also make Windows and Raspberry Pi binaries. But no special cross compile setup needed to make QT5, it just works.

Davo
 
Lazarus 2, Linux (and reluctantly Win10, OSX)
My Project - https://github.com/tomboy-notes/tomboy-ng

VTwin

  • Hero Member
  • *****
  • Posts: 1061
  • Former Turbo Pascal 3 user
Re: GTK or QT?
« Reply #19 on: September 21, 2021, 02:41:42 pm »
hello,
GTK2 is now EOL and  newer  GTK linux distribution versions use GTK3 by default.
On Ubuntu 20.04 LTS i have a project for image processing. When i use gtk2 as LCL widgetset i have some error messages at run time :
Quote
Gtk-Message: 13:32:49.621: Failed to load module "canberra-gtk-module"
GLib-GObject-WARNING **: 13:32:51.031: ../../../gobject/gsignal.c:1282: no emission of signal "key-release-event" to stop for instance '0x2628350'
Read this topic: GTK2 is now EOL :(   

Friendly, J.P

gtk3 is not even on the roadmap yet:

https://wiki.freepascal.org/Roadmap

It would be great if we could see what progress has been made, and it might inspire some bounties or donations.

Cheers
“Talk is cheap. Show me the code.” -Linus Torvalds

Free Pascal Compiler 3.2.0
macOS 10.13.6: Lazarus 2.0.12 (64 bit Cocoa)
Ubuntu 18.04.3: Lazarus 2.0.12 (64 bit on VBox)
Windows 7 Pro SP1: Lazarus 2.0.12 (64 bit on VBox)

Zvoni

  • Hero Member
  • *****
  • Posts: 739
Re: GTK or QT?
« Reply #20 on: September 21, 2021, 03:45:54 pm »
gtk3 is not even on the roadmap yet:

https://wiki.freepascal.org/Roadmap

It would be great if we could see what progress has been made, and it might inspire some bounties or donations.

Cheers
https://wiki.freepascal.org/GTK3_Interface
Quote
Current bindings (12.01.2021) are 3.8.6 and there's a plan to move it to 3.22 
One System to rule them all, One IDE to find them,
One Code to bring them all, and to the Framework bind them,
in the Land of Redmond, where the Windows lie
---------------------------------------------------------------------
People call me crazy, because i'm jumping out of perfectly fine aircraft

af0815

  • Hero Member
  • *****
  • Posts: 719
Re: GTK or QT?
« Reply #21 on: September 21, 2021, 04:58:45 pm »
Is there any information about the state of gtk3 ?


Edit: I should ask for 'actual' state of gtk3.
« Last Edit: September 22, 2021, 07:06:57 am by af0815 »
regards
Andreas

prof7bit

  • Full Member
  • ***
  • Posts: 134
Re: GTK or QT?
« Reply #22 on: October 02, 2021, 04:53:17 pm »
Fortunately with Lazarus you can defer this decision indefinitely and just use whatever seems best at the moment ;-)

I personally have used  GTK2 on Linux for a long time, until I recently upgraded some of my *buntu boxes to the 21.04 release and found that they are now very aggressively phasing out GTK2 support, removing theme support for GTK2, etc.

Fortunately the Qt5 widgetset has become very good in the meantime, I have upgraded from Lazarus 2.0 to the 2.2 branch earlier this year and at the same time I began gradually switching all my old projects over to Qt5. This is causing ZERO problems so far, exactly as one would expect with such an excellent versatile Toolkit that Lazarus is.
« Last Edit: October 02, 2021, 04:55:06 pm by prof7bit »

 

TinyPortal © 2005-2018