Problem with creating first project and the book "C++-gui-programming-with-qt-4-2ndedition"
-
Completely mixed up!
Please read the thread from beginning. My question is very simple. I gave the first example of the book and said how to make a project and put that snip code into that and run it.
I should first solve this problem and then be familiar with other parts of Qt.
This is the window of test.pro which I created it:
http://tinypic.com/view.php?pic=5ltrgj&s=8#.U5hiG3KSzis -
No, I'm not mixed up!
My explanation is very basic and noob proof.Don't change the pro file! Leave it alone, this comes later. The pro file is used by QMake (you will learn later) how to compile.
Then open the source folder (you know the little triangle in front of it). Then double click the main.cpp file (this will open it in creator). Then place your code there in the main function and delete the MainWindow creation for now.
You should get a window with only a button into it. It can't get any more simple then that! -
After much attempt I could to run the code. It worked. Please look at my code window screen in below link. Is everything fine to you?
http://tinypic.com/r/1265n3k/8 -
OK mate. Thank you very much for assigning your time for helping me.
I try to read that book carefully but it doesn't seem to be clear for beginners (for example now I should try to solve this: From a command prompt, change the directory to "test" and type qmake -project).
Thanks also to all of other guys that helped me.
-
If you want to know how to build projects without the IDE, working from the command prompt would help.
But it is not necessary as you may work completely from the Creator and the Qt Creator runs qmake and make for you.I think it is now helpful, if you try one of the examples supplied with Creator and then step back to the book and merge the code from the book to the IDE.
-
I started to learn Qt from "this":http://qt-project.org/doc/qt-5/tutorials-addressbook.html tutorial.
Try it.