HOw to execute this file?
HI, what is the commands to type in order to execute this file?
1
2 1: #include <kapp.h>
3 2: #include <qwidget.h>
4 3: #include <qpainter.h>
5 4:
6 5: class MyWindow : public Qwidget
7 6: {
8 7: public:
9 8: MyWindow() : QWidget() { }
10 9: protected:
11 10: void paintEvent(QPaintEvent *);
12 11: };
13 12:
14 13: void MyWindow::paintEvent(QPaintEvent *)
15 14: {
16 15: // Draw graphics on this object
17 16: QPainter paint(this);
18 17: // Draw a line (the destructor will make the line visible)
19 18: paint.drawLine(10,10,190,140);
20 19: }
21 20:
22 21:
23 22: int main(int argc, char **argv)
24 23: {
25 24: KApplication app(argc, argv);
26 25: MyWindow window;
27 26: window.setGeometry(50,50,200,150);
28 27: app.setMainWidget(&window);
29 28: window.setCaption("Qpainter");
30 29: window.show();
31 30: return app.exec();
32 31: }
33
thanks.
please help me, i'm only a student.. ..