rolandsun
8th June 2012, 03:52
I want to draw a real time scan radar image on widget with background terrian data, so I want to clean previous data to no color with transparent to show background correctly , I try to use codes as following
QColor qclr=QColor(Qt::tansparent);
painter->setPen(qclr);
painter->setBrush(qclr);
painter->drawConvexPolygon(pg);
but it does not works, previous data are not cleared. if I replace color with Qt::gray ,it works but I can not see the background .
I have read the post http://www.qtcentre.org/threads/3310-clean-with-transparent-color , it seem that there was no solution at that time ,how about now ?
thanks
QColor qclr=QColor(Qt::tansparent);
painter->setPen(qclr);
painter->setBrush(qclr);
painter->drawConvexPolygon(pg);
but it does not works, previous data are not cleared. if I replace color with Qt::gray ,it works but I can not see the background .
I have read the post http://www.qtcentre.org/threads/3310-clean-with-transparent-color , it seem that there was no solution at that time ,how about now ?
thanks