In which cases does QGraphicsScene::render not work?
-
And again, good day to everyone!
Can anyone tell under what conditions the procedure scene->render(...) won't do anything?
I observe a number of situations when, with a completely correct "input", the rendering of the specified area simply does not occur, although there are objects to draw (thousands of polygons) (and the execution time of the render() operation takes 0.0 ms).
If no one has any ideas offhand, then I will give a clipping from the code demonstrating the problem.
Thank you in advance for any help! -
And again, good day to everyone!
Can anyone tell under what conditions the procedure scene->render(...) won't do anything?
I observe a number of situations when, with a completely correct "input", the rendering of the specified area simply does not occur, although there are objects to draw (thousands of polygons) (and the execution time of the render() operation takes 0.0 ms).
If no one has any ideas offhand, then I will give a clipping from the code demonstrating the problem.
Thank you in advance for any help! -
@RoApPr said in In which cases does QGraphicsScene::render not work?:
with a completely correct "input"
Are you passing target or source rectangles? If you are, you are quite certain they are correct? That would be my first thought.
@JonB said in In which cases does QGraphicsScene::render not work?:
If you are, you are quite certain they are correct?
Yes, I use them, and I am absolutely sure of their correctness. BUT, even if this is not the case, I manually checked some of their correct values, at which rendering also does not occur.
-
Hi,
Can you provide a minimal compilable example that shows that issue ?
-
@JonB said in In which cases does QGraphicsScene::render not work?:
If you are, you are quite certain they are correct?
Yes, I use them, and I am absolutely sure of their correctness. BUT, even if this is not the case, I manually checked some of their correct values, at which rendering also does not occur.
-
@SGaist , look, while I was making a cropped copy of the program, I solved my original problem xD
However, the solution is a "crutch" that I would like not to use.
At the moment, the problem is this - when zooming the map, there is a moment when the rendering time of a new map section begins to take ten times longer than before. I can't understand why this is happening and hope for your help :)
Google disc program archive
P.S. I use Qt 5.12. -
@RoApPr
Fair enough. Are you able to test whether if you do not pass in any rectangles (so whole scene) these objects do show? Then we know it seems to be a source rectangle issue.