Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2003-09

qt status?

8 messages · 5 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Marc Weustink
to Andrew Johnson: Just wondering what the status on qt for pascal is, I don't use it or like it but I…
Andrew Johnson wrote 10 lines
Just wondering what the status on qt for pascal is, I don't use it or like it but I expect a lot of people want it to be able to make there apps targeted toward kde. awhile back it was mentioned that it shouldn't be that hard now to get translated headers for qt3. Is this currently still viable? or would an additional lib like originally implemented still be the only way, either way what is the probability of getting the interface for it on the roll again. I would very much like to see lazarus running on gnome2/gtk2 kde3/qt3 and win32 by our 1.0 release, which seems to be getting closer and closer now that things are stabalizing even on win32.

When we started QT was object based. That ment that every call had to be wrapped by a piece of C code to get a flat function call. I heard rumors (but don't know if they are true) that FPC could link against C++ objects so that the wrapper wasn't needed.
If FCP would support this, it would be in the 1.1 or later versions. Unless the qt3 libs contain flat apicalls (which I don't expect) we still need the wrapper.

Marc

Reply by email

Florian Klaempfl
to Unknown author: You still need the wrapper. But a C wrapper can be generated by Qt itself. (using the…
Andrew Johnson wrote 8 lines
alright. that sounds good. I will go look into that, and if moc _does_ produces cohesive enough ones, such that we don't need to actually include any of the actual translations and upkeep them ourselves, it might make usage easier anyway, since we could just require moc and have a script to compile things properly and link resulting c objects and pascal objects and stuff, perhaps in a lazarus package like the gtk2 one. And if not.. well we shall see. :)

I started a pascal output module for moc already some time ago but I didn't finish it. I'll see if I can dig it out.

Reply by email

Tom Lisjac
to Unknown author: You still need the wrapper. But a C wrapper can be generated by Qt itself. (using the…
...( I don't have kde installed nor do I want to if I can get away with it for now )

The CD bootable Knoppix distro would provide a convenient (and very complete) KDE testbed without having to install it on your system. When you're ready to run test code, drop in the CD, reboot and Knoppix will configure itself and read-only mount all the hard drive partitions it can find. It makes an excellent rescue disk as well.

http://www.knopper.net/knoppix-mirrors/index-en.html

-Tom

Reply by email

Andrew Johnson

Just wondering what the status on qt for pascal is, I don't use it or like it but I expect a lot of people want it to be able to make there apps targeted toward kde. awhile back it was mentioned that it shouldn't be that hard now to get translated headers for qt3. Is this currently still viable? or would an additional lib like originally implemented still be the only way, either way what is the probability of getting the interface for it on the roll again. I would very much like to see lazarus running on gnome2/gtk2 kde3/qt3 and win32 by our 1.0 release, which seems to be getting closer and closer now that things are stabalizing even on win32.

Andrew

Reply by email

Unknown author
to Marc Weustink: When we started QT was object based. That ment that every call had to be wrapped by a…
Marc Weustink wrote 19 lines
At 14:03 14-9-2003, Andrew Johnson wrote: >Just wondering what the status on qt for pascal is, I don't use it or >like it but I expect a lot of people want it to be able to make there >apps targeted toward kde. awhile back it was mentioned that it shouldn't >be that hard now to get translated headers for qt3. Is this currently >still viable? or would an additional lib like originally implemented >still be the only way, either way what is the probability of getting the >interface for it on the roll again. I would very much like to see >lazarus running on gnome2/gtk2 kde3/qt3 and win32 by our 1.0 release, >which seems to be getting closer and closer now that things are >stabalizing even on win32. When we started QT was object based. That ment that every call had to be wrapped by a piece of C code to get a flat function call. I heard rumors (but don't know if they are true) that FPC could link against C++ objects so that the wrapper wasn't needed. If FCP would support this, it would be in the 1.1 or later versions. Unless the qt3 libs contain flat apicalls (which I don't expect) we still need the wrapper.

You still need the wrapper. But a C wrapper can be generated by Qt itself. (using the 'moc' compiler tool if I'm right)

Michael.

Reply by email

Andrew Johnson
to Unknown author

alright. that sounds good. I will go look into that, and if moc _does_ produces cohesive enough ones, such that we don't need to actually include any of the actual translations and upkeep them ourselves, it might make usage easier anyway, since we could just require moc and have a script to compile things properly and link resulting c objects and pascal objects and stuff, perhaps in a lazarus package like the gtk2 one. And if not.. well we shall see. :)

Andrew

Show quoted text 31 lines
On Sun, 14 Sep 2003, Marc Weustink wrote: > At 14:03 14-9-2003, Andrew Johnson wrote: > >Just wondering what the status on qt for pascal is, I don't use it or > >like it but I expect a lot of people want it to be able to make there > >apps targeted toward kde. awhile back it was mentioned that it shouldn't > >be that hard now to get translated headers for qt3. Is this currently > >still viable? or would an additional lib like originally implemented > >still be the only way, either way what is the probability of getting the > >interface for it on the roll again. I would very much like to see > >lazarus running on gnome2/gtk2 kde3/qt3 and win32 by our 1.0 release, > >which seems to be getting closer and closer now that things are > >stabalizing even on win32. > > When we started QT was object based. That ment that every call had to be > wrapped by a piece of C code to get a flat function call. I heard rumors > (but don't know if they are true) that FPC could link against C++ objects > so that the wrapper wasn't needed. > If FCP would support this, it would be in the 1.1 or later versions. > Unless the qt3 libs contain flat apicalls (which I don't expect) we still > need the wrapper. You still need the wrapper. But a C wrapper can be generated by Qt itself. (using the 'moc' compiler tool if I'm right) Michael. _________________________________________________________________ To unsubscribe: mail with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives

Reply by email

Florian Klaempfl
to Unknown author: You still need the wrapper. But a C wrapper can be generated by Qt itself. (using the…
Florian Klaempfl wrote 13 lines
Andrew Johnson wrote: > alright. that sounds good. I will go look into that, and if moc _does_ > produces cohesive enough ones, such that we don't need to actually > include any of the actual translations and upkeep them ourselves, it > might make usage easier anyway, since we could just require moc and have > a script to compile things properly and link resulting c objects and > pascal objects and stuff, perhaps in a lazarus package like the gtk2 > one. And if not.. well we shall see. :) > I started a pascal output module for moc already some time ago but I didn't finish it. I'll see if I can dig it out.

Ok, I digged it out, for an example output look below. As you may see, it needs some fixes. But the whole output is done in one file of 800 lines of C++. The conversion is done by a tool called kalyptus which comes with KDE3 and it is used to generate the C, Java, ObjC etc. wrappers as well. It generates C++ wrappers as well as an pascal import unit. If it looks suitable, I'll continue to get it working. For the interessted, kalyptus can be found in the kdebindings-3.X.X package.

{*************************************************************************** QButton.pas - description
-------------------
begin : Sun Aug 11 16:37:06 2002
copyright : (C) 2000-2001 Lost Highway Ltd. All rights reserved.
email :
generated by : on Sun Aug 11 16:37:06
2002, using kalyptus 0.9.

***************************************************************************}

{*************************************************************************** *
*
* This library is free software; you can redistribute it and/or modify *
* it under the terms of the GNU Library General Public License as *
* published by the Free Software Foundation; either version 2 of the *
* License, or (at your option) any later version. *
*
*

***************************************************************************}

unit QButton;
interface
uses qtp_types;
{*
***************************************************************************
* $Id:  qt/qbuttongroup.h   3.0.3   edited Oct 12 12:18 $
*
* Definition of QButtonGroup class
*
* Created : 950130
*
* Copyright (C) 1992-2000 Trolltech AS.  All rights reserved.
*
* This file is part of the widgets module of the Qt GUI Toolkit.
*
* This file may be distributed under the terms of the Q Public License
* as defined by Trolltech AS of Norway and appearing in the file
* LICENSE.QPL included in the packaging of this file.
*
* This file may be distributed and/or modified under the terms of the
* GNU General Public License version 2 as published by the Free Software
* Foundation and appearing in the file LICENSE.GPL included in the
* packaging of this file.
*
* Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
* licenses may use this file in accordance with the Qt Commercial License
* Agreement provided with the Software.
*
* This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
* WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
* See http://www.trolltech.com/pricing.html or email  for
*   information about Qt Commercial License Agreements.
* See http://www.trolltech.com/qpl/ for QPL licensing information.
* See http://www.trolltech.com/gpl/ for GPL licensing information.
* Contact  if any conditions of this licensing are
* not clear to you.
*
********************************************************************
  @short
***************************************************************************
* $Id:  qt/qbuttongroup.
}
#define QBUTTON_SingleShot      0
#define QBUTTON_Toggle  1
#define QBUTTON_Tristate        2
#define QBUTTON_Off     0
#define QBUTTON_NoChange        1
#define QBUTTON_On      2
function QButton_metaObject(instPointer : PQButton) : PQMetaObject;
function QButton_className(instPointer : PQButton) : pchar;
function QButton_qt_cast(instPointer : PQButton; arg1 : pchar) : pointer;
function QButton_qt_invoke(instPointer : PQButton; arg1 : longint;  arg2
: PQUObject) : longint;
function QButton_qt_emit(instPointer : PQButton; arg1 : longint;  arg2 :
PQUObject) : longint;
function QButton_qt_property(instPointer : PQButton; arg1 : longint;
arg2 : longint;  arg3 : PQVariant) : longint;
function QButton_qObject(instPointer : PQButton) : PQObject;
function new_QButton( parent : qt_QWidget *;  name : pchar;  f :
longint) : PQButton;cdecl;
procedure del_QButton(p : PQButton);cdecl;
function QButton_text(instPointer : PQButton) : PQString;
procedure QButton_setText(instPointer : PQButton;var arg1 : QString);
function QButton_pixmap(instPointer : PQButton) : PQPixmap;
procedure QButton_setPixmap(instPointer : PQButton; arg1 : qt_QPixmap *);
function QButton_accel(instPointer : PQButton) : qt_QKeySequence*;
procedure QButton_setAccel(instPointer : PQButton; arg1 : qt_QKeySequence*);
function QButton_isToggleButton(instPointer : PQButton) : longint;
function QButton_toggleType(instPointer : PQButton) : ToggleType;
procedure QButton_setDown(instPointer : PQButton; arg1 : longint);
function QButton_isDown(instPointer : PQButton) : longint;
function QButton_isOn(instPointer : PQButton) : longint;
function QButton_state(instPointer : PQButton) : ToggleState;
function QButton_autoResize(instPointer : PQButton) : longint;
procedure QButton_setAutoResize(instPointer : PQButton; arg1 : longint);
function QButton_autoRepeat(instPointer : PQButton) : longint;
procedure QButton_setAutoRepeat(instPointer : PQButton; arg1 : longint);
function QButton_isExclusiveToggle(instPointer : PQButton) : longint;
function QButton_group(instPointer : PQButton) : qt_QButtonGroup*;
procedure QButton_animateClick(instPointer : PQButton);
procedure QButton_toggle(instPointer : PQButton);
function QButton_staticMetaObject() : PQMetaObject;
function QButton_tr( arg1 : pchar;  arg2 : pchar) : PQString;
function QButton_trUtf8( arg1 : pchar;  arg2 : pchar) : PQString;
procedure QButton_setToggleButton(instPointer : PQButton; arg1 : longint);
procedure QButton_setToggleType(instPointer : PQButton; arg1 : ToggleType);
procedure QButton_setOn(instPointer : PQButton; arg1 : longint);
procedure QButton_setState(instPointer : PQButton; arg1 : ToggleState);
function QButton_hitButton(instPointer : PQButton; pos : qt_QPoint*) :
longint;
procedure QButton_drawButton(instPointer : PQButton; arg1 : qt_QPainter *);
procedure QButton_drawButtonLabel(instPointer : PQButton; arg1 :
qt_QPainter *);
procedure QButton_enabledChange(instPointer : PQButton; arg1 : longint);

Reply by email

Andrew Johnson
to Unknown author: You still need the wrapper. But a C wrapper can be generated by Qt itself. (using the…

ok so googling and looking through all sorts of docs I find qtc and kdec which apear to be mostly autogenerated files for c library translation layer, eg libqtc.so (apears to even ship with newer RH). this might be the easiest way to go to create fpc bindings to the c bindings library :)

This is definitely a kde driven effort, and since kde (and the qt it uses) are gpl, it couldn't be used in commercial apps(btw how is that going to be handled? the qt interface itself under gpl, and proper warnings in the IDE upon selecting it?) It may not actually require anything kde-wise since the kde and qt are abstracted from each other. I am not sure of the impact on those who would like to use qt interface itself cross-platform, since I am not sure of the compilability of these libs seperate from kde, however either way it would work on just about any of the *BSD and linux so I suppose thats good enough.

If this looks reasonable to other people I suppose I can grab qt and then these sources and try and compile them here( I don't have kde installed nor do I want to if I can get away with it for now ) and start using h2c to try and generate headers and see how well it does sometime in the next few weeks.

So Thoughts?

Andrew

Andrew Johnson wrote 47 lines
alright. that sounds good. I will go look into that, and if moc _does_ produces cohesive enough ones, such that we don't need to actually include any of the actual translations and upkeep them ourselves, it might make usage easier anyway, since we could just require moc and have a script to compile things properly and link resulting c objects and pascal objects and stuff, perhaps in a lazarus package like the gtk2 one. And if not.. well we shall see. :) Andrew On Sun, 2003-09-14 at 13:24, wrote: > On Sun, 14 Sep 2003, Marc Weustink wrote: > > > At 14:03 14-9-2003, Andrew Johnson wrote: > > >Just wondering what the status on qt for pascal is, I don't use it or > > >like it but I expect a lot of people want it to be able to make there > > >apps targeted toward kde. awhile back it was mentioned that it shouldn't > > >be that hard now to get translated headers for qt3. Is this currently > > >still viable? or would an additional lib like originally implemented > > >still be the only way, either way what is the probability of getting the > > >interface for it on the roll again. I would very much like to see > > >lazarus running on gnome2/gtk2 kde3/qt3 and win32 by our 1.0 release, > > >which seems to be getting closer and closer now that things are > > >stabalizing even on win32. > > > > When we started QT was object based. That ment that every call had to be > > wrapped by a piece of C code to get a flat function call. I heard rumors > > (but don't know if they are true) that FPC could link against C++ objects > > so that the wrapper wasn't needed. > > If FCP would support this, it would be in the 1.1 or later versions. > > Unless the qt3 libs contain flat apicalls (which I don't expect) we still > > need the wrapper. > > You still need the wrapper. But a C wrapper can be generated by Qt itself. > (using the 'moc' compiler tool if I'm right) > > Michael. > > _________________________________________________________________ > To unsubscribe: mail with > "unsubscribe" as the Subject > archives at http://www.lazarus.freepascal.org/mailarchives _________________________________________________________________ To unsubscribe: mail with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives

Reply by email