Qt-interest Archive, November 1997
A C binding for Qt - QtC 0.0.2
Pages: Prev | 1 | 2 | Next
Message 1 in thread
Hello, people.
First a little background:
In the middle of all that flamefest in comp.os.linux.advocacy about Qt, KDE,
what is free software, and other things, somebody made a statement that
kinda made a little sense.
He said Qt (and then KDE) could never become a standard, because it didn't
support C. I replied that a C wrapper for Qt should possible to write in
about a week. Well, a week has passed, and here is that wrapper :-)
QtC provides access from C to every public method of every widget in Qt, as
well as to some other things.
The docs are a little unexistant, but most things can be deduced from the
excellent Qt docs.
I have uploaded the sources for this library to ftp.troll.no,
ftp.kde.org and sunsite.unc.edu. I suppose they will be moved soon to some
adequate place.
The name of the file is QtC-0.0.2.tar.gz, and it is licensed under the GPL.
The license will be changed to LGPL for the next version.
A similar library providing access to the KDE libs will follow shortly.
Hope you like it. Enjoy!
Best regards.
("\''/").__..-''"`-. . Roberto Alsina
`9_ 9 ) `-. ( ).`-._.`) ralsina@unl.edu.ar
(_Y_.)' ._ ) `._`. " -.-' Centro de Telematica
_..`-'_..-_/ /-'_.' Universidad Nacional del Litoral
(l)-'' ((i).' ((!.' Santa Fe - Argentina
"Bloody instructions which, being taught, return to plague their inventor"
Message 2 in thread
Roberto Alsina wrote:
> Hello, people.
>
> First a little background:
> In the middle of all that flamefest in comp.os.linux.advocacy about
> Qt, KDE,
> what is free software, and other things, somebody made a statement
> that
> kinda made a little sense.
>
> He said Qt (and then KDE) could never become a standard, because it
> didn't
> support C. I replied that a C wrapper for Qt should possible to write
> in
> about a week. Well, a week has passed, and here is that wrapper :-)
>
> QtC provides access from C to every public method of every widget in
> Qt, as
> well as to some other things.
> The docs are a little unexistant, but most things can be deduced from
> the
> excellent Qt docs.
>
> I have uploaded the sources for this library to ftp.troll.no,
> ftp.kde.org and sunsite.unc.edu. I suppose they will be moved soon to
> some
> adequate place.
>
> The name of the file is QtC-0.0.2.tar.gz, and it is licensed under the
> GPL.
> The license will be changed to LGPL for the next version.
>
> A similar library providing access to the KDE libs will follow
> shortly.
>
> Hope you like it. Enjoy!
>
> Best regards.
>
> ("\''/").__..-''"`-. . Roberto Alsina
> `9_ 9 ) `-. ( ).`-._.`) ralsina@unl.edu.ar
> (_Y_.)' ._ ) `._`. " -.-' Centro de Telematica
> _..`-'_..-_/ /-'_.' Universidad Nacional del Litoral
> (l)-'' ((i).' ((!.' Santa Fe - Argentina
> "Bloody instructions which, being taught, return to plague their
> inventor"
What is the "big problem" about qt, that it only supports C !? I am a
'C' programmer who started programming with assembly language about
1982. I have about 10 years of experience with 'C', but qt was a good
reason to learn c++. Are you to old to learn something new? Me not! And
I think it was worth doing it. C can be seen as a subset of c++ and I
seen no problem in mixing it (that may be the reason for the fast 'C
wrapper for qt)
Matthias
Message 3 in thread
On Sat, 8 Nov 1997, Matthias Toussaint wrote:
[snip]
> What is the "big problem" about qt, that it only supports C !? I am a
> 'C' programmer who started programming with assembly language about
> 1982. I have about 10 years of experience with 'C', but qt was a good
> reason to learn c++. Are you to old to learn something new? Me not!
I have no doubt in my mind that Roberto is an avid fan of C++ and that he
will write many more programs in Qt than with QtC.
QtC is for people who like the choice.
-Taj.
Sirtaj S. Kang taj@kde.org ssk@physics.unimelb.edu.au
School of Physics Univ of Melbourne The KDE is NOT a Window Manager.
Message 4 in thread
On Sat, 8 Nov 1997, Sirtaj Singh Kang wrote:
> QtC is for people who like the choice.
It is for people who are rabidly terrified of learning C++.
-Dan
Message 5 in thread
On Sat, 8 Nov 1997, Dan Hollis wrote:
> On Sat, 8 Nov 1997, Sirtaj Singh Kang wrote:
> > QtC is for people who like the choice.
>
> It is for people who are rabidly terrified of learning C++.
Ok, then, it's for them. If they prefer C, then I hope they use it and
enjoy it. What's the big problem?
("\''/").__..-''"`-. . Roberto Alsina
`9_ 9 ) `-. ( ).`-._.`) ralsina@unl.edu.ar
(_Y_.)' ._ ) `._`. " -.-' Centro de Telematica
_..`-'_..-_/ /-'_.' Universidad Nacional del Litoral
(l)-'' ((i).' ((!.' Santa Fe - Argentina
"Bloody instructions which, being taught, return to plague their inventor"
Message 6 in thread
Roberto Alsina wrote:
>
> > It is for people who are rabidly terrified of learning C++.
>
> Ok, then, it's for them. If they prefer C, then I hope they use it and
> enjoy it. What's the big problem?
Just wondering: How can you actually write a Qt program using QtC? I
mean, C++ is not just a language with a different syntax from C, but it
is an object-oriented language (i.e. if you use it the right way). I
cannot imagine programming using Qt without deriving my own classes from
Qt's classes.
Bye,
Mirko Froehlich.
Message 7 in thread
"Mirko" == Mirko =?ISO-8859-1?Q?Fr=F6hlich <Mirko> writes:
Mirko> Just wondering: How can you actually write a Qt program using
Mirko> QtC? I mean, C++ is not just a language with a different syntax
Mirko> from C, but it is an object-oriented language (i.e. if you use
Mirko> it the right way). I cannot imagine programming using Qt
Mirko> without deriving my own classes from Qt's classes.
It's eminently possible to write object-oriented code in C.
Message 8 in thread
Scott Goehring wrote:
>
> It's eminently possible to write object-oriented code in C.
But how would you do that? Please tell me how it works, this really
interests me.
Bye,
Mirko Froehlich.
Message 9 in thread
"Mirko" == Mirko =?ISO-8859-1?Q?Fr=F6hlich <Mirko> writes:
>> It's eminently possible to write object-oriented code in C.
Mirko> But how would you do that? Please tell me how it works, this
Mirko> really interests me.
Look at (a) the output of cfront (a C++ -> C translator) (b) gtk+, an
excellent, if immature, free C-based widget set.
Message 10 in thread
Scott Goehring wrote:
>
> "Mirko" == Mirko =?ISO-8859-1?Q?Fr=F6hlich <Mirko> writes:
>
> >> It's eminently possible to write object-oriented code in C.
>
> Mirko> But how would you do that? Please tell me how it works, this
> Mirko> really interests me.
>
> Look at (a) the output of cfront (a C++ -> C translator) (b) gtk+, an
> excellent, if immature, free C-based widget set.
Heh, I can't believe people missed this one, Qt being a GUI toolkit &
all...
(c) Any book on widget writing using Xt. The object model is more or
less identical to C++ (sans multiple inheritance), although the
framework leaves a little to be desired.
Andy
--
[ signature omitted ]
Message 11 in thread
On Sat, 8 Nov 1997, Scott Goehring wrote:
> It's eminently possible to write object-oriented code in C.
Yes, but its harder. And how do you do e.g. overloading or templates in C?
If youre going to write oo code, why not just use C++.
-Dan
Message 12 in thread
On Sat, 8 Nov 1997, Mirko =?ISO-8859-1?Q?Fr=F6hlich ?= wrote:
> Roberto Alsina wrote:
> >
> > > It is for people who are rabidly terrified of learning C++.
> >
> > Ok, then, it's for them. If they prefer C, then I hope they use it and
> > enjoy it. What's the big problem?
>
> Just wondering: How can you actually write a Qt program using QtC? I
> mean, C++ is not just a language with a different syntax from C, but it
> is an object-oriented language (i.e. if you use it the right way). I
> cannot imagine programming using Qt without deriving my own classes from
> Qt's classes.
Well, it won't be easy ;-)
QtC lets you use Qt standard widgets. New widgets should be created using
C++, but if you are desperate enough, I'm sure something could be done
usig, say, an eventfilter and intercepting the repaint events, for example.
("\''/").__..-''"`-. . Roberto Alsina
`9_ 9 ) `-. ( ).`-._.`) ralsina@unl.edu.ar
(_Y_.)' ._ ) `._`. " -.-' Centro de Telematica
_..`-'_..-_/ /-'_.' Universidad Nacional del Litoral
(l)-'' ((i).' ((!.' Santa Fe - Argentina
"Bloody instructions which, being taught, return to plague their inventor"
Message 13 in thread
"Dan" == Dan Hollis <goemon@sasami.anime.net> writes:
>> QtC is for people who like the choice.
Dan> It is for people who are rabidly terrified of learning C++.
Or who think C++ is a heap of donkey dung.
Message 14 in thread
On Sat, 8 Nov 1997, Scott Goehring wrote:
> "Dan" == Dan Hollis <goemon@sasami.anime.net> writes:
> >> QtC is for people who like the choice.
> Dan> It is for people who are rabidly terrified of learning C++.
> Or who think C++ is a heap of donkey dung.
Unfortunately this belief is based on FUD and misinformation, not reality.
-Dan
Message 15 in thread
what? yet another nasty 'C versus C++' flame war?
what´s the problem with these C bindings?
>QtC is for people who like the choice.
>>It is for people who are rabidly terrified of learning C++.
>>>Or who think C++ is a heap of donkey dung.
>>>>Unfortunately this belief is based on FUD and misinformation, not reality.
>>>>>If youre going to write oo code, why not just use C++.
You prefer C++ and will never use them? Right.
You *like* C (I *do*) and don´t mind the lack of OO support (I do)?
Right.
I for one would really like to have Modula-3 (I find it much nicer than
C++) bindings for Qt. And if they happen to come into existence, will we
see a new 'C-like versus pascal-like' flame war?
I say muy bien hecho to Roberto Alsina for writing QtC. It's nice that
such things are done. But Mirko Fröhlich was the only one here that took
a constructive approach.
-Daniel
Pages: Prev | 1 | 2 | Next