faq
flatforty
contribute
subscribe
configure
search
rdf
main
parent
|
QT not quite C++
by Anonymous Lurker on Wednesday 14/Apr/2004, @05:33
|
About the comments about QT beeing better for C++ development this is not (of course) what the GTKmm people think:
http://www.gtkmm.org/features.shtml
Then again, I am a C coder so QT is quite irrelevant for me but if I'm going to start working on C++ I would rather user GTKmm as it is more standard and seems to use C++ in a more modern way.
Regards. |
|
|
The Fine Print: The following comments
are owned by whomever posted them.
( Reply )
|
Re: QT not quite C++
by Scott Wheeler on Wednesday 14/Apr/2004, @06:41
|
Bah, get a better trolling line. This one sucks... GTKMM isn't a bad toolkit but it doesn't compare to Qt in scope or maturity. Just compare the APIs to see what the two offer. Qt is a very pragmatic toolkit -- its goals are ease of use, portability and whatnot. If you're really prefer some sort of esoteric sense of "standard" and put that above pragmatism, well, have fun -- but then you probably wouldn't be using C++ either. ;-)
|
[
Reply To This | View ]
|
Re: QT not quite C++
by Philippe Fremy on Wednesday 14/Apr/2004, @07:16
|
The Gtkmm rants against Qt always comes back to the same equation:
- GTKmm is more standard == GTKmm uses templates instead of moc preprocessor to handle signal and slots
- GTKmm uses C++ in a more modern way == GTKmm uses templates instead of moc preprocessor to handle signal and slots
- GTKmm is typesafe == GTKmm uses templates instead of moc preprocessor to handle signal and slots
So yes, Qt does not use templates for signal and slots. There are drawbacks to this that are quite minimal:
- your namespace is "polluted" with the following macros: slots, signal, emit, SIGNAL, SLOT
- you have to pre-process your files through the moc.
However, the moc approach of Qt does have advantages. For example, it adds introspection feature to C++ which can be quite convenient. You can also dynamically load and connects Object.
If you write code only for the aesthethic of the result, then the debate "moc vs template signals" matters. If you write code to produce software, you don't care since both methods produce software that works. You will learn to use either in less than one day of coding.
|
[
Reply To This | View ]
|
Re: QT not quite C++
by Micha Bieber on Thursday 15/Apr/2004, @01:21
|
I don't know GTKmm but I find this line of argumentation always a bit - sorry - infantil. You say about yourself, that you are a C programmer but judges something (in practice) more or less unknown to you (C++/Qt) using buzzwords like 'modern'.
When compilers came out able to support templates, I used them with excitement. It is such a cooool language feature. It is - but it has his limitations. You will become aware of this, when you try something non-trivial with them - and trivial things too: I recommend you a search on the net for an article from Andrei Alexandrescu in "C++ report" (out of print) or "C++ user journal". He tries to implement there a max template max<T,T> in an absolutely satisfying way. It wasn't successful - and Andrei was well aware of this (and mocked of himself). So, feateres alone are nothing.
To Qt:
They implemented their extensions in a very pragmatic, but still useful and sensible way. Give them a try and then come back.
Micha
|
[
Reply To This | View ]
|
Re: QT not quite C++
by Anonymous Lurker on Thursday 15/Apr/2004, @03:00
|
Hi all, thanks.
These posts have been quite productive for me, as It was easy to read between lines that what the GTKmm people say is true, it's just that not many people find their arguments convincing.
Basicaly what I have learn from these posts is that QT is non-standard C++, limited by the support of old compilers, monolythic but complete and pragmatic. I already learn that "modern" is a buzzword and is non-sense but "have fun with it" is a deterministic technical feature.
And not forgetting the Propietary/GPL license, and not having even the GPL on Windows (and all my family use OpenOffice and Mozilla on Windows so please stop saying nonsese about free software on Windows beeing stupid).
Ok, if I choose to jump to C++ I have made my mind up clearly.
BTW: I am a C and PHP coder but make no GUI work by the moment, and no I have no time to test GTK and QT and C++ before choosing a GUI framework, that's why I made these comments, I just don't believe anybody's PR (neither GTKmm nor Trolltech) and need an independent opinion.
|
[
Reply To This | View ]
|
Re: QT not quite C++
by Lubos Lunak on Thursday 15/Apr/2004, @05:18
|
Qt is standard C++, otherwise it wouldn't compile with g++ obviously. And moc, BTW, is actually not a preprocessor, the only preprocessor used is the standard C++ preprocessor (well, at least if I understand the difference between a preprocessor and a code generator or whatever the proper name for this functionality is). In other words, Qt C++ code is compiled as is just like any other C++ code, and hence it's standard C++ as well. The difference between Qt and gtkmm is basically the fact that they're different.
|
[
Reply To This | View ]
|
Re: QT not quite C++
by Richard Dale on Thursday 15/Apr/2004, @08:13
|
Yes, complaining about moc code generation is like complaining that it's wrong to generate code from a Qt Designer .ui file, because you should only have 'pure C++' in your project. After all C++ wouldn't be any fun if it wasn't 'difficult' - you need to show off to lesser programmers that you'd actually mastered it. And of course those 'hand crafted' widgets are so much better than any autogenerated nonsense from a .ui file.
But I'm personally not a fan of C++, although I can code in it, because I just find it too much of a headache. If I was a PHP/C programmer I think I'd try out PyQt or PyGtk perhaps, not C++. There is absolutely no such thing as 'C++ for Dummies', whichever toolkit you use it is very, very hard.
|
[
Reply To This | View ]
|
Re: QT not quite C++
by David on Thursday 15/Apr/2004, @06:50
|
The GTKmm people produce standards for C++? Wow. You learn something new every day.
|
[
Reply To This | View ]
|
Re: QT not quite C++
by Micha Bieber on Thursday 15/Apr/2004, @08:02
|
>Ok, if I choose to jump to C++ I have made my mind up clearly.
This is seldom the case, if the mind has been burdened by too much emotions :->
The point, that you get here sarcastic answers is caused by your very own posting. 'modern!=good' and 'old!=bad'. In fact, these words alone have no meaning at all without careful evaluation. The technical points you missed in your flurry of excitement to remain independent have been brought to you by some other posters. I can only repeat my advice. Use the librariy(ies) and form a own view on them. Nobody here here will make you do something.
Micha
|
[
Reply To This | View ]
|
|
The Fine Print: The previous
comments are owned by whomever posted them.
( Reply )
|
|