Ok, so here what I don t understand :Originally Posted by jacek
In my Current class, where I do all the drawing in the Current:aintEvent.
I create a Son(which is not a Widget), and I call Son->draw().
I want this function for example to draw an ellipse on the Current (which is the widget).
So in Son::draw I just do update(), which calls the Son:aintEvent which will draw the Ellipse.
Then, in my Son:aintEvent what do I do ???? that s the point that I do not understand !!! I can t do QPainter painter(this)
son.cpp(106): error C2664: 'QPainter::QPainter(QPaintDevice *)'*: impossible de convertir le paramètre 1 de Son*const ' en 'QPaintDevice *'
That s why I was doing all the thing with passing the Widget to the Son so he knows where to draw !!!!!
Bookmarks