Recent

Author Topic: QT and Lazarus  (Read 18058 times)

Takeda

  • Full Member
  • ***
  • Posts: 157
QT and Lazarus
« on: August 11, 2011, 01:05:20 am »
Today, I planning to porting my app to be available for QT (Due my Cross-Platform planning)..

I saw Lazarus give the opportunity of it.. So this is good sound for me..

My questions :
1). Can I built commercial app using QT OpenSource Edition, (since QT now also available as LGPL)??

2). I saw QT Release new version (QT 4.7.3), so I download it), I also download FPC QT4 Binding (The latest binary binding library)=> QT4Pas5.dll v2.4. But I saw in the Binary Binding package QT4.pas (an unit for QT4 Binding) then I take look into Lazarus I saw the same Unit (QT4.pas and it refers to QT45.pas). What should I do if I want to use QT 4.7.3 + FPC QT4Binding (The latest)? Should I use QT4.pas which shipped inside Lazarus or I must replace it using the new which shipped with FPC QT4 Binding package?


Regards,
Takeda.
Call me Takeda coz that's my true name.
Pascal coding using Lazarus => "Be native in any where.."

ƪ(˘⌣˘)┐ ƪ(˘⌣˘)ʃ ┌(˘⌣˘)ʃ

Leledumbo

  • Hero Member
  • *****
  • Posts: 8108
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: QT and Lazarus
« Reply #1 on: August 11, 2011, 01:23:15 am »
Quote
1). Can I built commercial app using QT OpenSource Edition, (since QT now also available as LGPL)??
Hmm... I don't know if QT is now LGPL, if that's so, then yes you should be allowed to.
Quote
What should I do if I want to use QT 4.7.3 + FPC QT4Binding (The latest)? Should I use QT4.pas which shipped inside Lazarus or I must replace it using the new which shipped with FPC QT4 Binding package?
Better replace since the shipped one might be out of date.

Takeda

  • Full Member
  • ***
  • Posts: 157
Re: QT and Lazarus
« Reply #2 on: August 11, 2011, 10:17:32 pm »
Yes, I saw QT Now available in GNU LGPL.. :)

Well, should I to pay some dollar if I use QT as my app framework?


Quote
Better replace since the shipped one might be out of date.

Is there possible the problems arise? coz I'm afraid If I directly replace it then the problems will arise like we know that QT4.pas or QT45.pas is part of Lazarus Widgetset..

BTW, Thank you for your reply..

Regards,
takeda.
Call me Takeda coz that's my true name.
Pascal coding using Lazarus => "Be native in any where.."

ƪ(˘⌣˘)┐ ƪ(˘⌣˘)ʃ ┌(˘⌣˘)ʃ

Troodon

  • Sr. Member
  • ****
  • Posts: 484
Re: QT and Lazarus
« Reply #3 on: August 11, 2011, 10:45:47 pm »
Qt4 is LGPL, which means that any application, commercial or not, can dynamically link the Qt shared libraries, free of charge. This also means that you cannot statically link those libraries in your application unless you pay licensing fees. To my knowledge, Lazarus/FPC generates statically-linked executables only.

There are advantages and disadvantages to using Qt over GTK+ in Lazarus/FPC applications. Advantages: increased performance with Qt; more "eye-candy" widgets; better compatibility with some ultramobile device OSes (at least in theory). Disadvantages: licensing restrictions (LGPL); less KDE than Gnome desktops installed (although this does not preclude having both Qt and GTK+ libraries on the same machine); Qt widget set incomplete in Lazarus. Also, your user may need to install the particular Qt library version that your application depends on. A similar situation exists on Windows for .NET applications when users find out that they need to install the latest .NET Framework to run a small application.
« Last Edit: August 11, 2011, 10:51:43 pm by Troodon »
Lazarus/FPC on Linux

Takeda

  • Full Member
  • ***
  • Posts: 157
Re: QT and Lazarus
« Reply #4 on: August 11, 2011, 11:35:36 pm »
Qt4 is LGPL, which means that any application, commercial or not, can dynamically link the Qt shared libraries, free of charge. This also means that you cannot statically link those libraries in your application unless you pay licensing fees. To my knowledge, Lazarus/FPC generates statically-linked executables only.

There are advantages and disadvantages to using Qt over GTK+ in Lazarus/FPC applications. Advantages: increased performance with Qt; more "eye-candy" widgets; better compatibility with some ultramobile device OSes (at least in theory). Disadvantages: licensing restrictions (LGPL); less KDE than Gnome desktops installed (although this does not preclude having both Qt and GTK+ libraries on the same machine); Qt widget set incomplete in Lazarus. Also, your user may need to install the particular Qt library version that your application depends on. A similar situation exists on Windows for .NET applications when users find out that they need to install the latest .NET Framework to run a small application.

In short word is => I must use QT4Pas5.dll in my app than use static lib in my app if my app is commercial purpose ??

Actually, I want to use GTK2+ than QT since Gtk2+ is so familiar for me.. But Gtk2+ is not yet give natural "look and feel" in different OSes. Gtk use their own Dialog Model than use the native Oses dialog.. Different with Gtk, QT is more "native" in different Oses.. That's the reason why I want to use QT than Gtk.. :D

Regards,
takeda.
Call me Takeda coz that's my true name.
Pascal coding using Lazarus => "Be native in any where.."

ƪ(˘⌣˘)┐ ƪ(˘⌣˘)ʃ ┌(˘⌣˘)ʃ

Leledumbo

  • Hero Member
  • *****
  • Posts: 8108
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: QT and Lazarus
« Reply #5 on: August 12, 2011, 12:36:44 am »
Quote
Is there possible the problems arise? coz I'm afraid If I directly replace it then the problems will arise like we know that QT4.pas or QT45.pas is part of Lazarus Widgetset..
Nope, the bindings is from the same author and it's backward compatible.
Quote
In short word is => I must use QT4Pas5.dll in my app than use static lib in my app if my app is commercial purpose ??
For the Qt part, yes. You may still link to other modified LGPL libs, though.

DenJean

  • New Member
  • *
  • Posts: 18
Re: QT and Lazarus
« Reply #6 on: August 24, 2011, 10:08:37 am »
Qt4 is LGPL, which means that any application, commercial or not, can dynamically link the Qt shared libraries, free of charge. This also means that you cannot statically link those libraries in your application unless you pay licensing fees. To my knowledge, Lazarus/FPC generates statically-linked executables only.
The Qt4 binding is technically a Qt C++ library and binds dynamically to Qt.

There are advantages and disadvantages to using Qt over GTK+ in Lazarus/FPC applications. Advantages: increased performance with Qt; more "eye-candy" widgets; better compatibility with some ultramobile device OSes (at least in theory). Disadvantages: licensing restrictions (LGPL); less KDE than Gnome desktops installed (although this does not preclude having both Qt and GTK+ libraries on the same machine); Qt widget set incomplete in Lazarus. Also, your user may need to install the particular Qt library version that your application depends on. A similar situation exists on Windows for .NET applications when users find out that they need to install the latest .NET Framework to run a small application.
Qt is available under LGPL while Gtk is ONLY available under LGPL. So there is NO difference if you use the LGPL libraries. However Qt has the benefit of also being available under a commercial license, while Gtk is not. The advantage of a commercial license is that you can change the Qt library and do not have to publish your changes to Qt.

see http://www.gtk.org/ and http://qt.nokia.com/products/licensing

DenJean

  • New Member
  • *
  • Posts: 18
Re: QT and Lazarus
« Reply #7 on: August 24, 2011, 10:20:10 am »
But I saw in the Binary Binding package QT4.pas (an unit for QT4 Binding) then I take look into Lazarus I saw the same Unit (QT4.pas and it refers to QT45.pas). What should I do if I want to use QT 4.7.3 + FPC QT4Binding (The latest)? Should I use QT4.pas which shipped inside Lazarus or I must replace it using the new which shipped with FPC QT4 Binding package?
Every version of the Qt4 binding has a Pascal header Qt4.pas. Like a C-header the versioning is not in the header name but the libraries however are versioned. It more complicated, but this is a start. The Lazarus developers at some point in time support several versions of Qt by using different versions of the Pascal header and therefore versioned the header to qt44.pas and qt45.pas and qt4.pas just included the proper one using a conditional compilation directive. So if the latest binding is not used yet in Lazarus svn, you only need to replace qt4.pas with the new one and apply any patches provided by me with that release (no patches necessary for the latest release). It is usually better to use the latest version of Qt as it contains bug fixes, performance improvements and so on, likewise you should use the latest binding.

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3541
Re: QT and Lazarus
« Reply #8 on: August 24, 2011, 10:55:45 am »
Disadvantages: licensing restrictions (LGPL); less KDE than Gnome desktops installed (although this does not preclude having both Qt and GTK+ libraries on the same machine); Qt widget set incomplete in Lazarus.

This issue of licensing restrictions does not apply since a long time. Plus, I'd say LCL-Qt is actually better then LCL-Gtk2, so this item does not apply either.

For me the only disadvantage of LCL-Qt is requiring libQt4Pas.so to be installed and potential versioning problems with that library (for example a Linux distro might ship an older version then your app requires).

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3541
Re: QT and Lazarus
« Reply #9 on: August 24, 2011, 10:59:23 am »
2). I saw QT Release new version (QT 4.7.3), so I download it), I also download FPC QT4 Binding (The latest binary binding library)=> QT4Pas5.dll v2.4. But I saw in the Binary Binding package QT4.pas (an unit for QT4 Binding) then I take look into Lazarus I saw the same Unit (QT4.pas and it refers to QT45.pas). What should I do if I want to use QT 4.7.3 + FPC QT4Binding (The latest)? Should I use QT4.pas which shipped inside Lazarus or I must replace it using the new which shipped with FPC QT4 Binding package?

I would use qt4.pas shipped inside Lazarus if you are developing using the LCL, because that is what is tested by everyone. Qt is backwards compatible, so even if you download a new version of Qt, it should still run your LCL-Qt app which has headers for an older version of Qt.

Takeda

  • Full Member
  • ***
  • Posts: 157
Re: QT and Lazarus
« Reply #10 on: August 24, 2011, 07:26:33 pm »
Quote
Qt is available under LGPL while Gtk is ONLY available under LGPL. So there is NO difference if you use the LGPL libraries. However Qt has the benefit of also being available under a commercial license, while Gtk is not. The advantage of a commercial license is that you can change the Qt library and do not have to publish your changes to Qt.

see http://www.gtk.org/ and http://qt.nokia.com/products/licensing

Hmm, I see.. But Gtk+2 is fully LGPL then in other hand QT as Leledumbo said, "Hmm... I don't know if QT is now LGPL, if that's so, then yes you should be allowed to.". In my conclusion => I can build commercial app using it..

But the real fact, I saw QT providing Commercial License to be used in commercial purpose, and then they provide OpenSource Edition too, which release as LGPL'ed.. Again, in my conclusion => If I want to build commercial app then I must buy the commercial edition, Right?

Disadvantages: licensing restrictions (LGPL); less KDE than Gnome desktops installed (although this does not preclude having both Qt and GTK+ libraries on the same machine); Qt widget set incomplete in Lazarus.

This issue of licensing restrictions does not apply since a long time. Plus, I'd say LCL-Qt is actually better then LCL-Gtk2, so this item does not apply either.

For me the only disadvantage of LCL-Qt is requiring libQt4Pas.so to be installed and potential versioning problems with that library (for example a Linux distro might ship an older version then your app requires).

Thank you for the info, Sir.. :)

2). I saw QT Release new version (QT 4.7.3), so I download it), I also download FPC QT4 Binding (The latest binary binding library)=> QT4Pas5.dll v2.4. But I saw in the Binary Binding package QT4.pas (an unit for QT4 Binding) then I take look into Lazarus I saw the same Unit (QT4.pas and it refers to QT45.pas). What should I do if I want to use QT 4.7.3 + FPC QT4Binding (The latest)? Should I use QT4.pas which shipped inside Lazarus or I must replace it using the new which shipped with FPC QT4 Binding package?

I would use qt4.pas shipped inside Lazarus if you are developing using the LCL, because that is what is tested by everyone. Qt is backwards compatible, so even if you download a new version of Qt, it should still run your LCL-Qt app which has headers for an older version of Qt.

Ok, I'll do your suggestion.. Thank you so much, Mr. Felipe..

Regards,
Takeda.
Call me Takeda coz that's my true name.
Pascal coding using Lazarus => "Be native in any where.."

ƪ(˘⌣˘)┐ ƪ(˘⌣˘)ʃ ┌(˘⌣˘)ʃ

DenJean

  • New Member
  • *
  • Posts: 18
Re: QT and Lazarus
« Reply #11 on: August 24, 2011, 07:41:33 pm »
Quote
Qt is available under LGPL while Gtk is ONLY available under LGPL. So there is NO difference if you use the LGPL libraries. However Qt has the benefit of also being available under a commercial license, while Gtk is not. The advantage of a commercial license is that you can change the Qt library and do not have to publish your changes to Qt.

see http://www.gtk.org/ and http://qt.nokia.com/products/licensing

Hmm, I see.. But Gtk+2 is fully LGPL then in other hand QT as Leledumbo said, "Hmm... I don't know if QT is now LGPL, if that's so, then yes you should be allowed to.". In my conclusion => I can build commercial app using it..

But the real fact, I saw QT providing Commercial License to be used in commercial purpose, and then they provide OpenSource Edition too, which release as LGPL'ed.. Again, in my conclusion => If I want to build commercial app then I must buy the commercial edition, Right?
.

Please read the provided links, they show that Gtk and Qt are fully available in LGPL. Leledumbo wrote he was not sure if Qt was available in LGPL. So, again, yes you can develop commercial applications with Qt LGPL.  Again, the advantage of Qt is that with a commercial license you can make changes to Qt w/o providing these changes, whilst with Gtk you will always need to provide the changes to you made to Gtk. So again there is only more choice with Qt than with Gtk.

marcov

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 7446
Re: QT and Lazarus
« Reply #12 on: August 26, 2011, 01:22:03 pm »
Qt4 is LGPL, which means that any application, commercial or not, can dynamically link the Qt shared libraries, free of charge. This also means that you cannot statically link those libraries in your application unless you pay licensing fees. To my knowledge, Lazarus/FPC generates statically-linked executables only.

Pascal parts are statically linked by default.   External C libs like QT remain shared. So this is no problem