I know its a little late in the game, but I'm having trouble getting the output to the console. I know how to get output using a GUI application.
Take for example 6.5, I have created the empty Qt4 project, copied the Student.cpp, Student.h, and student-test.cpp files to the project directory. Then I added the .cpp files to the project in Qt4 and ignored the header file. Everything complied correctly.
But the question still remains, how do I see the program run in the Command Prompt? (Console output). The instructions given on page 141 seem to be for LINUX.
I even tried coping the code to C++ and compling there, to get output. Of course that didn't work since the program is written using Qt4 objects.
Any help, would be welcomed, sothat I can finish my assignment.
I've managed to get the SliderLCD example to compile and run from the files I copied.
I just have one question: the debug message appears on the application output tab in Qt4 and not in the Debug Log of sliderlcd.
How would I get the debug message to appear in sliderlcd?
Figured it out. Every time you are asked to create a consol app, instead of creating a new empty Qt Project, create a Qt Consol app instead. Then all you need to do is remove the code generated by Qt inside the main and add your own. Don't forget to add your QTextStream cout(stdout, QIODevice::WriteOnly); above main, so you can call cout <<. Have fun