QGraphicsView scaling
-
I'm developing an application with QGraphicsView and QGraphicsScene. My problem is that when I scale my drawing, increasing its size, the lines get thicker and ticker, that is, it is being scaled as a raster, not vectorial. Is there a way to change that behavior? I'd like the lines kept it's original width.
-
@jonesabr said in QGraphicsView scaling:
My problem is that when I scale my drawing, increasing its size, the lines get thicker and ticker, that is, it is being scaled as a raster, not vectorial. Is there a way to change that behavior?
going a bit more into detail would help a lot.
What kind of drawing? How they are drawn? -
@jonesabr
for me it's still no clear what your issue is.Maybe the desired behavior you want to achieve can be accomplished with a cosmetic pen?
-
Since Qt5, Pens are non-cosmetic by default (for performance reasons, I believe). That means, their thickness gets scaled just as everything else.
If you want lines that stay constant in width, use setCosmetic(true) on the pens.
A word of warning: Anything but a width of 0 or 1 causes a huge performance hit on those. -
@raven-worx Yes, you killed it. That's is the solution.
Thank you once more