Sign in Join

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

Mailing lists / lazarus / 2003-09

Qt header progress

7 messages · 4 people ·

Reply by email Subscribe to this list Your subscription

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

Michael Van Canneyt
to Florian Klaempfl: I'am working currently on adapting kalyptus (the KDE tool to generate C binding for…
Florian Klaempfl wrote
I'am working currently on adapting kalyptus (the KDE tool to generate C binding for Qt/KDE) to output pascal bindings. I think it will be finished in a few days. A small, already working example is attached.

Great !!
(but you forgot the Qt file ;))

Show quoted text 20 lines
uses qt; var a : qapplicationh; hello : qpushbuttonh; Qt_EventDelegate : pointer;cvar; begin Qt_EventDelegate:=nil; a:=qt_new_QApplication(argc, argv); hello:=qt_new_QPushButton1('Hello world, by FPC/Qt', nil, nil); QPushButton_resize(hello, 200, 50 ); QApplication_setMainWidget(a, hello); QWidget_show(hello); QApplication_exec(a); end. Any suggestions for improvements?

Why the 'h' at the end of types ? This makes it incompatible with Kylix, I think...

Michael.

Reply by email

Florian Klaempfl

I'am working currently on adapting kalyptus (the KDE tool to generate C binding for Qt/KDE) to output pascal bindings. I think it will be finished in a few days. A small, already working example is attached.

uses
    qt;
var
   a : qapplicationh;
   hello : qpushbuttonh;
   Qt_EventDelegate : pointer;cvar;
begin
   Qt_EventDelegate:=nil;
   a:=qt_new_QApplication(argc, argv);
   hello:=qt_new_QPushButton1('Hello world, by FPC/Qt', nil, nil);
   QPushButton_resize(hello, 200, 50 );
   QApplication_setMainWidget(a, hello);
   QWidget_show(hello);
   QApplication_exec(a);
end.

Any suggestions for improvements?

Reply by email

Florian Klaempfl
to Florian Klaempfl
Mattias Gaertner wrote 5 lines
>>uses >> qt; Will this be the only unit?

Yes, I want it as much as possible compatible with kylix.

Show quoted text 7 lines
>>begin >> Qt_EventDelegate:=nil; >> a:=qt_new_QApplication(argc, argv); >> hello:=qt_new_QPushButton1('Hello world, by FPC/Qt', nil, nil); Why the '1'?

Hmmm, an overleft from C. Because C doesn't allow overloading, methods with the same name get a number as prefix. I'll try to remove it in further versions.

Reply by email

Unknown author
to Florian Klaempfl: It's splitted into several include files with a total size of 31k lines :) I added it…
Florian Klaempfl wrote
Michael Van Canneyt wrote: > (but you forgot the Qt file ;)) It's splitted into several include files with a total size of 31k lines :)

Right... :-)

> Why the 'h' at the end of types ? This makes it incompatible with Kylix, I think... I added it because the clx qt.pas had it :)

I wasn't sure, hence the 'I think' :-)

Anyway, this is good news. It could be the start of the Qt interface for FPC.

And maybe we can get GUI apps on the Zaurus as well with it :-)

Michael.

Reply by email

Mattias Gaertner
to Florian Klaempfl: I'am working currently on adapting kalyptus (the KDE tool to generate C binding for…
Show quoted text 14 lines
On Tue, 23 Sep 2003, Florian Klaempfl wrote: > I'am working currently on adapting kalyptus (the KDE tool to generate C > binding for Qt/KDE) to output pascal bindings. I think it will be > finished in a few days. A small, already working example is attached. Great !! (but you forgot the Qt file ;)) > > uses > qt;

Will this be the only unit?

Show quoted text 9 lines
> var > a : qapplicationh; > hello : qpushbuttonh; > Qt_EventDelegate : pointer;cvar; > > begin > Qt_EventDelegate:=nil; > a:=qt_new_QApplication(argc, argv); > hello:=qt_new_QPushButton1('Hello world, by FPC/Qt', nil, nil);

Why the '1'?

Show quoted text 10 lines
> QPushButton_resize(hello, 200, 50 ); > QApplication_setMainWidget(a, hello); > QWidget_show(hello); > QApplication_exec(a); > end. > > Any suggestions for improvements? Why the 'h' at the end of types ? This makes it incompatible with Kylix, I think...

Mattias

Reply by email

Florian Klaempfl
to Unknown author: Right... :-) I wasn't sure, hence the 'I think' :-) Anyway, this is good news. It could…
I wasn't sure, hence the 'I think' :-) Anyway, this is good news. It could be the start of the Qt interface for FPC.

Why start ;)? When kalypus is fixed completly, the whole conversion can be done automatically.

And maybe we can get GUI apps on the Zaurus as well with it :-)

Yes, this was one of the reasons why I started it :) because it's currently not very useful to work on the ARM with all these changes in the register allocator.

Reply by email