Tutorials or Guide required on Qt4 Utility Libraries

Guys I have recently been working with Qt4 Libs and I suddenly felt that Qt is really an awfully lot powerful toolkit...

Now, I have certain tutorials on building GUI with Qt... I am working with them. In the meanwhile, I need some links to the tutorials which are related to only the console applications built through Qt.

More elaborately, I just knew that I could implement this programme

#include <iostream>
using namespace std;

1
2
3
4
5
6
7
8
9
int main()
{
	cout<<"This is a simple programme implemented through C++ STL."<<endl;
	cout<<"STL stands for Standard Template Library."<<endl;
	cout<<"STL is the default library of C++ containing most useful functions."<<endl;
	cout<<"STL is normally part of a Linux distribution or the compiler."<<endl;
	
	return(0);
}

Through Qt4 libraries like this

1
2
3
4
5
6
7
8
#include <QTextStream>

int main()
{
	QTextStream txtStreamObject(stdout);
	txtStreamObject<<"This is a simple console app implemented through Qt TextStream Library."<<endl;
	return(0);
}


Now I think all the things which I could do through STL can be done effectively and easily with Qt4... I know many guys won't be in favour of Qt over STL when it comes to console application. Neither am I... Just for knowledge you know...
Qt is a great GUI library, don't get me wrong. But Trolltech admittedly made several design
decisions up front that limit its ability to work well with STL, or simply replace some of the
STL with things that can be at best equivalent in functionality and equivalent in stability.

Things like all of their containers come to mind... QString and QStringList, etc. Unless they've
ompletely mimicked std::list<> and std::string down to API methods, iterator traits, etc., those
containers will not mesh as well with STL as the equivalent STL containers.

Also, the signal-slot mechanism they use requires the moc to compile, whereas boost provides
the same functionality in C++ without the need for an extra compilation step. And boost::function
and boost::bind are much more powerful tools for callback functions that Qt will likely ever provide.
jsmith wrote:
Things like all of their containers come to mind... QString and QStringList, etc. Unless they've
ompletely mimicked std::list<> and std::string down to API methods, iterator traits, etc., those
containers will not mesh as well with STL as the equivalent STL containers.


I can second that - I tried to use some of the QT STL containers.
You can't do a like-for-like substitution with for example QVector and std::vector
Topic archived. No new replies allowed.