|
|
. . . From now on, we will assume that you have a correctly installed copy of Qt 4 and that Qt's bin directory is in your PATH environment variable. (On Windows, this is done automatically by the Qt installation program.) You will also need the program's code in a file called hello.cpp in a directory called hello. You can type in hello.cpp yourself or copy it from the examples that accompany this book, where it is available as examples/chap01/hello/hello.cpp. (All the examples are available from the book's web site, http://www.informit.com/title/0132354160.) Figure 1.1. From a command prompt, change the directory to hello, and type qmake -project to create a platform-independent project file (hello.pro), and then type qmake hello.pro to create a platform-specific makefile from the project file. (The qmaketool is covered in more detail in Appendix B.) Type make to build the program. Run it by typing hello on Windows, . . . |
admkrk wrote: |
---|
For me make is not recognized on Windows |
New Project->Choose(use defaults - Application & Qt Widgets Application )->Next->Next->Next->Finish Paste your code into main.cpp overwriting the template Build->Run To remove mainwindow.h and mainwindow.cpp (not neccessary to run the app): Right click on the file in the upper left pane->Remove File->OK Repeat |