Recent

Author Topic: How are the libQtXpas files created?  (Read 717 times)

vfclists

  • Hero Member
  • *****
  • Posts: 1147
    • HowTos Considered Harmful?
How are the libQtXpas files created?
« on: September 27, 2024, 09:50:02 pm »
Are C equivalents of the widgets'  C++ header files created by the Qt project itself, after which some utility translates them for Pascal, or is some utility used that translate the C++ header files to their Pascal equivalents?

Does libqtXpas enable using Qt widgets with Lazarus or FPC even if LCL components are not yet available for them?
Lazarus 3.0/FPC 3.2.2

cdbc

  • Hero Member
  • *****
  • Posts: 1774
    • http://www.cdbc.dk
Re: How are the libQtXpas files created?
« Reply #1 on: September 28, 2024, 09:06:57 am »
Hi
I think it's @Zeljko who creates them, by way of flattening the C++ classes/objects in QT, to a C-interface, that pascal can use... Quite a bit of work, goes into it ...and knowledge.
Regards Benny
If it ain't broke, don't fix it ;)
PCLinuxOS(rolling release) 64bit -> KDE5 -> FPC 3.2.2 -> Lazarus 2.2.6 up until Jan 2024 from then on it's: KDE5/QT5 -> FPC 3.3.1 -> Lazarus 3.0

dbannon

  • Hero Member
  • *****
  • Posts: 3189
    • tomboy-ng, a rewrite of the classic Tomboy
Re: How are the libQtXpas files created?
« Reply #2 on: September 28, 2024, 11:50:26 am »
I understand Zeljko himself uses those libraries directly, without using LCL but that is just an impression.

Davo
Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

Bogen85

  • Hero Member
  • *****
  • Posts: 702
Re: How are the libQtXpas files created?
« Reply #3 on: September 28, 2024, 12:04:25 pm »
I use the libraries myself outside of Lazarus (without using the LCL).
(none of the gui apps I develop using FPC use Lazarus or the LCL)

What is there works well, but keep in mind it is a subset of Qt, only what is needed for LCL.

If you are coming from Qt there is somewhat of a learning curve.

You have to study the qtX unit in question a bit before you can reasonably use it.

About 15000 lines of code for the qt6 unit.
https://github.com/davidbannon/libqt6pas/blob/master/cbindings/qt62.pas

Bogen85

  • Hero Member
  • *****
  • Posts: 702
Re: How are the libQtXpas files created?
« Reply #4 on: September 28, 2024, 01:19:57 pm »
There is a lot missing, notably in regard to event handlers for widgets.

The functionality to set up event handlers exists with what is provided in these units, but you have to dig a bit into the Qt documentation to figure things out.

Qt offers multiple ways of doing the same thing, these units typically only have one way.

 

TinyPortal © 2005-2018