Did you try compiling this code? IMO it won't compile.
You need to call the base class implementation in the paint event, that's for sure.
Did you try compiling this code? IMO it won't compile.
You need to call the base class implementation in the paint event, that's for sure.
To answer your question, just call the base class in your paintEvent:
Qt Code:
//this will draw your widget, and therefore the label too //then draw your point Qpainter painter(this); painter.drawPoint(x, y); }To copy to clipboard, switch view to plain text mode
But to answer your problem, if you are trying to implement a GIS engine with QLabeland painting points, maybe you should better read the documentation about about QGraphicsViewand QGraphicsPixmapItem.
Last edited by scascio; 20th September 2009 at 15:35.
bpatel (21st September 2009)
@above
tbahks yaar for reply
Bookmarks