I am completely new to QT. I just downloaded and compiled 4.0 open source edtion.
I see QT itself has many classes that have very similar functionalities as STL classes do. So I wonder why I should use Q* classes instead of STL classes. Do Q* classes provide more speed, performance or security?
Thanks.
--------------------------------------------------------------------------------
In Qt3 Qt templete classes were provided mainly for convinience, as they fit well with other Qt classes (the same architecture, etc.). With Qt4 the situation changed, as Qt4 container classes have more powerfull iterators (java type ones). Besides, on some platforM$ STL implementation is quite buggy, so using universal Qt template classes could be a benefit here too.
BTW. It's Qt not QT
------------------------------------------------------------------
Okay, I am only skimming thru the docs until now. I guess the main benefit of using Q* classes is streamlined coding style.
BTW, I think "on some platfor M$ STL implementation..." actually only translates to "on Windows platform M$ STL implementation..." So when you refer to m$ compilers, there is only one platform - Windows.
----------------------------------------------------------------------------
In earlier days the STL was not available on all platforms, so something else was needed.
Today there are no good arguments not to use the STL and IMO it was one of the
worst design decisions ever of TrollTech not to use it in Qt4 (or at least to implement one, if
there is really a platform today, where no STL exists. )
There is a lot what hate about the STL, but it´s the standard, what is much more important than programing Java style in C++.
If you can use the QTL all over your application do it, otherwise you have to convert the STL, when they come to Qt APIs. If not I recommend to use the STL wherever possible and convert to QTL only where you have to.
--------------------------------------------------------------------------
I seem to recall STL results in much larger executables than QTL due to code bloat. Not a problem in most cases, except maybe for Qt/Embedded.