Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why item border lines have different width when scale the view? #130

Open
linkoln opened this issue Dec 26, 2018 · 5 comments
Open

Why item border lines have different width when scale the view? #130

linkoln opened this issue Dec 26, 2018 · 5 comments

Comments

@linkoln
Copy link

linkoln commented Dec 26, 2018

As you can see in the red and blue rect, it's strange that the border lines have different width when I scale the report view . I have test it in the latest code and the problem exists.Wish your help!

@fralx
Copy link
Owner

fralx commented Dec 26, 2018

This happens because, in fact, 2 frames are superimposed on each other and the calculation of coordinates when scaling due to rounding does not take place accurately enough. The coordinates are calculated by the QGraphicsScene and i can't change it behavior :(. When you print or export a report, this will not happen. Maybe in the future i will create TableItem to prevent this behavior.

@linkoln
Copy link
Author

linkoln commented Dec 27, 2018

Yeah, when print or export a report, it's no problem.
But i create a demo which implements my own QGraphicsItem and QGraphicsView and show the view,when i scale the view it don't have this problem. I'm confused with it.

@linkoln linkoln closed this as completed Dec 27, 2018
@linkoln linkoln reopened this Dec 27, 2018
@fralx
Copy link
Owner

fralx commented Dec 27, 2018

Look at this pictures, it is a qgraphicscene example from qt. I just scale the picture and you can see the bold border exists on 1 screen and doesn't on second.
1
2

@linkoln
Copy link
Author

linkoln commented Dec 29, 2018

You are right.So the only way to solve this problem is to change the QGraphicsScene 's source code?Have any way else?

@fralx
Copy link
Owner

fralx commented Dec 30, 2018

At the moment i don't see the way how to fix this problem. But it wasn't critical for me and i didn't research deeply how to solve the problem. May be in future i will find the way :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants