Hi All,
I have created application on Windows/Linux using QT 4.5.1 (Open Source). I have used QGraphicsView/Scene architecture to display Graphics items (rectangles etc). I have implemented zoom selection functionaliy. i.e. on Mouse selection, the zoom in the selected area using QGraphicsView::fitInView() function.
My code works find on Linux but on Windows XP it hangs/slows down after 2 consecutive zoom in operations.
Please tell me what could be the cause ?? Or any clue.
Thanks in advance.
Following is the functions from my code,
void MyGraphicsView:aintEvent(QPaintEvent * event)
{
QPaintEvent *newEvent = new QPaintEvent(event->region().boundingRect());
QGraphicsView:aintEvent(event);
delete newEvent;
}
void MyGraphicsView::mouseReleaseEvent(QMouseEvent *event)
{
QPainterPath path = scene()->selectionArea();
scene()->clearSelection();
fitInView(path.boundingRect(), Qt::KeepAspectRatio);
QGraphicsView::mouseReleaseEvent(event);
}
Bookmarks