Hi,
If I add a rect to a QGraphicsScene with a zero height, the rect is still displayed on the QGraphicsView.
Created with:
QMatrix matrix;
matrix.scale(8, -8);
graphicsView.setMatrix(matrix);
scene.addRect(0, 0, 10, 5, QPen(QColor("yellow"), 1));
scene.addRect(0, 0, 1, 0, QPen(QColor("red"), 1));
scene.addRect(5, 0, 5, 0, QPen(QColor("blue"), 0), QBrush(QColor("green"), Qt::NoBrush));
The complete source file is here: Empty Rect Example [pastebin.com]
What can I do to make this (red and blue) rect to not display anything but still be there?
↧