I have installed Qt on my ubuntu laptop and I get nothing but errors compiling .cpp files with <QApplication> preprocessor directives. I am new to using Qt and are reading a book online about it hosted here:
http://www.informit.com/articles/article.aspx?p=1405562
Specific error i have obtained running g++ hello.cpp -o hello:
hello.cpp:1:24: fatal error: QApplication: No such file or directory

Running qmake hello.cpp in the directory makes a .pro file that also has errors.

Ideas?

You probably have not installed the Qt development package. It should be named something like "qt-devel". That's what it is named on Red Hat systems. Not sure about Ubuntu.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.