5 * 1. Créer le fichier hello.pro :
6 * +------------------------------------------------------------+
8 * |CONFIG += qt debug |
9 * |SOURCES += hello.cc |
10 * +------------------------------------------------------------+
12 * 2. Créer le fichier Makefile avec la commande :
13 * $ qmake -makefile hello.pro
14 * ou tout simplement :
17 * 3. Compiler avec la commande :
24 #include <QApplication>
25 #include <DrawingArea.h>
26 #include <DrawingThread.h>
27 #include <DrawingWindow.h>
31 int main_drawing_thread(DrawingArea &a)
33 std::cout << "[ " << a.width() << " x " << a.height() << " ]\n";
41 // std::cerr << "loooooooooooooooooooooop "
42 // << y << " (" << c << ")\n";
44 for (int yy = y; yy < y + 10; yy++)
45 for (int x = 0; x < w; x++)
51 std::cerr << "loooooooooooooooooooooop "
52 << y << " (" << c << ")\n";
58 int main(int argc, char *argv[])
60 QApplication application(argc, argv);
61 DrawingArea drawingArea(800, 600);
62 DrawingWindow drawingWindow(drawingArea);
63 DrawingThread drawingThread(drawingArea, main_drawing_thread);
66 drawingThread.start();
68 return application.exec();