HI,
i have drawn one polygon using paint eventin QWidget. i have implemented code for zoom in/zoom out using wheelevent like below
wheeleventconst QPointF points[4]={(100,100),(125,67),(125,99),(100,200)};
QPaintevent(QPainter painter)
{
painter.scale(m_scale,m_scale);
painter.drawPolygon(points,4);
}
}QWheelevent(QWheelEvent *event)
{
if(event->delta()>0
{
m_scale+=0.5;
update();
problem is here it's zooming but position of polygon is shifting right.
please tell me why it's happening like this.
thanks in advance
Bookmarks