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

Updating drawing in qt #53

Open
mrdanbrooks opened this issue Jul 23, 2014 · 0 comments
Open

Updating drawing in qt #53

mrdanbrooks opened this issue Jul 23, 2014 · 0 comments
Labels
Milestone

Comments

@mrdanbrooks
Copy link
Owner

Block text does not update correctly.

This is because we reuse blocks if the index value is still needed. We do however reassign values to blocks such as the text that should be drawn with them. But Qt does not understand that the text value changed, so it doesn't repaint until you zoom or resize the window.

This can be manually specified by either telling the view to redraw everything every time using

setViewportUpdateMode(QGraphicsView.FullViewportUpdate)

inside the QtView - but this is very inefficient. Alternatively, we can call

update(self.rect())

inside the BlockItem's set_attributes() function. This works but does not update text that spills outside the box.

@mrdanbrooks mrdanbrooks added this to the Model-View-Adapter milestone Jul 23, 2014
@mrdanbrooks mrdanbrooks self-assigned this Jul 23, 2014
@mrdanbrooks mrdanbrooks changed the title updating block text Updating drawing in qt Jul 23, 2014
@mrdanbrooks mrdanbrooks removed their assignment Jul 23, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant