Re: [SLE] Question for you programmers and those who onlye tinker w/ programming. RE Python and QT , esp in concert.
Kai Ponte wrote:
Qt ( www.trolltech.com ) and Python ( www.python.org ) are both programming languages. [snip] Qt is a C++ compiler and set of tools (called "widgets") from Tolltech company in Norway.
Qt is a programming library or toolkit, not a language nor a compiler.
Okay, not knowing anything about C++ I assumed "toolkit" was akin to "compiler." Does that mean I could take the code for GIMP and run it using the Qt toolkit? -- kai ponte www.perfectreign.com <insert extremely obnoxious signature here>
Kai Ponte wrote:
Kai Ponte wrote:
Qt ( www.trolltech.com ) and Python ( www.python.org ) are both programming languages. [snip] Qt is a C++ compiler and set of tools (called "widgets") from Tolltech company in Norway. Qt is a programming library or toolkit, not a language nor a compiler.
Okay, not knowing anything about C++ I assumed "toolkit" was akin to "compiler."
Does that mean I could take the code for GIMP and run it using the Qt toolkit?
You would have to rewrite it quite dramatically. Especially since GTK is written in C and not C++. But in theory it could be done. I seriously doubt it ever will though
On Tuesday 24 January 2006 12:58 pm, Anders Johansson wrote:
You would have to rewrite it quite dramatically. Especially since GTK is written in C and not C++. But in theory it could be done. I seriously doubt it ever will though
What he is saying is gimp uses the GTK toolkit as apposed to KDE which uses the Qt toolkit. They are also referred to as Widget sets. And then there is the underlying, C++ can do C (in fact that is EXACTLY what happens when you compile C++, it basically converts to C) but not the other way around. B-)
Brad Bourn wrote:
What he is saying is gimp uses the GTK toolkit
I wouldn't say that, because GTK actually stands for Gimp Tool Kit, so what you just said is "gimp uses the gimp tool kit toolkit". I wouldn't be that tautological :)
On Tuesday 24 January 2006 1:03 pm, Anders Johansson wrote:
Brad Bourn wrote:
What he is saying is gimp uses the GTK toolkit
I wouldn't say that, because GTK actually stands for Gimp Tool Kit, so what you just said is "gimp uses the gimp tool kit toolkit". I wouldn't be that tautological :)
Good point... hehhehe Just trying to simplify and put in laymens terms. Thanks for the clairification. B-)
Brad Bourn wrote:
And then there is the underlying, C++ can do C (in fact that is EXACTLY what happens when you compile C++, it basically converts to C) but not the other way around.
AFAIK, g++ moved away from generating C code as an intermediate step quite some time ago. But aren't you contradicting yourself - "C++ can do C" because you could convert C++ code into straight C-code - but then you've effectively got "C doing C++", havent' you? :-) /Per Jessen, Zürich (-6.94 °C) -- http://www.spamchek.com/ - managed anti-spam and anti-virus solution. Let us analyse your spam- and virus-threat - up to 2 months for free.
On Tuesday 24 January 2006 1:12 pm, Per Jessen wrote:
But aren't you contradicting yourself - "C++ can do C" because you could convert C++ code into straight C-code - but then you've effectively got "C doing C++", havent' you? :-)
Not really I don't think. I've written routines in straight C to use on a release platform, but I use Qt to make a test harnes GUI for me to test the C platform code. I can't however use my C++ stuff with the platform's C compiler. e.g. g++ can compile striaght C code. the watcom C compiler can't do anything with my C++ code. B-)
Brad Bourn wrote:
On Tuesday 24 January 2006 1:12 pm, Per Jessen wrote:
But aren't you contradicting yourself - "C++ can do C" because you could convert C++ code into straight C-code - but then you've effectively got "C doing C++", havent' you? :-)
Not really I don't think.
I've written routines in straight C to use on a release platform, but I use Qt to make a test harnes GUI for me to test the C platform code.
I can't however use my C++ stuff with the platform's C compiler.
e.g. g++ can compile striaght C code. the watcom C compiler can't do anything with my C++ code.
C can accomplish anything C++ can do (or indeed anything any other language can do), but that's not the same as saying a C compiler can read C++ code straight. But the very fact that g++ is written in C makes it obvious that C++ can do nothing that C can't. A C++ compiler on the other hand can read C code unchanged, because C is a pure subset of C++
And linker would probably be more precise, but, I'm trying to stick with broad/generic/laymen terms for the OP. (And because I never really did care about the little things) heh B-) On Tuesday 24 January 2006 1:11 pm, Brad Bourn wrote:
On Tuesday 24 January 2006 1:12 pm, Per Jessen wrote:
But aren't you contradicting yourself - "C++ can do C" because you could convert C++ code into straight C-code - but then you've effectively got "C doing C++", havent' you? :-)
Not really I don't think.
I've written routines in straight C to use on a release platform, but I use Qt to make a test harnes GUI for me to test the C platform code.
I can't however use my C++ stuff with the platform's C compiler.
e.g. g++ can compile striaght C code. the watcom C compiler can't do anything with my C++ code.
B-)
-- Check the headers for your unsubscription address For additional commands send e-mail to suse-linux-e-help@suse.com Also check the archives at http://lists.suse.com Please read the FAQs: suse-linux-e-faq@suse.com
Kai Ponte wrote:
Okay, not knowing anything about C++ I assumed "toolkit" was akin to "compiler." Does that mean I could take the code for GIMP and run it using the Qt toolkit?
That's not the way it works. Toolkits are collections of routines that do nifty things for you. They're libraries just as e.g. glibc, but often called toolkits as they do more complex stuff. When the GIMP authors wrote GIMP, they decided whether or not to use Qt. I think they went with GTK+ : ldd /usr/bin/gimp libgtk-1.2.so.0 => /opt/gnome/lib/libgtk-1.2.so.0 (0x4002c000) libgdk-1.2.so.0 => /opt/gnome/lib/libgdk-1.2.so.0 (0x4016d000) libgmodule-1.2.so.0 => /opt/gnome/lib/libgmodule-1.2.so.0 (0x401a6000) libglib-1.2.so.0 => /opt/gnome/lib/libglib-1.2.so.0 (0x401a9000) libdl.so.2 => /lib/libdl.so.2 (0x401cf000) libXi.so.6 => /usr/X11R6/lib/libXi.so.6 (0x401d2000) libXext.so.6 => /usr/X11R6/lib/libXext.so.6 (0x401da000) libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x401e8000) libm.so.6 => /lib/i686/libm.so.6 (0x402e4000) libpthread.so.0 => /lib/i686/libpthread.so.0 (0x40307000) libc.so.6 => /lib/i686/libc.so.6 (0x40359000) /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000) So no, you can't take the GIMPS source code and "run it" with Qt. /Per Jessen, Zürich (-7.07 °C) -- http://www.spamchek.com/ - managed anti-spam and anti-virus solution. Let us analyse your spam- and virus-threat - up to 2 months for free.
participants (4)
-
Anders Johansson
-
Brad Bourn
-
Kai Ponte
-
Per Jessen