Here is a strange behaviour which I am not sure but it looks like a possible bug.
connect(m_zoomer,
SIGNAL(zoomed
(QRectF)),
this,
SLOT(getZoomedArea
(QRectF)));
void my2dPlot
::getZoomedArea(QRectF newlyZoomedArea
) {
QPointF a
= newlyZoomedArea.
topLeft();
//(1535.7824557983249, -1.2464700495720682e-12) QPointF b
= newlyZoomedArea.
bottomRight();
//(1572.0439921135721, 2.5595399250520858e-11) zoomedArea.setTopLeft(a);
zoomedArea.setBottomRight(b);
}
connect(m_zoomer,SIGNAL(zoomed(QRectF)), this,SLOT(getZoomedArea(QRectF)));
void my2dPlot::getZoomedArea(QRectF newlyZoomedArea)
{
QPointF a = newlyZoomedArea.topLeft();//(1535.7824557983249, -1.2464700495720682e-12)
QPointF b = newlyZoomedArea.bottomRight();//(1572.0439921135721, 2.5595399250520858e-11)
zoomedArea.setTopLeft(a);
zoomedArea.setBottomRight(b);
}
To copy to clipboard, switch view to plain text mode
As you can see from the numbers I got from debugging,
a is not a topleft but a bottomleft and
b is not a bottomright but a topright
Is it a bug? please reproduce
Bookmarks