simulton / QSchematic

A library that allows creating diagrams such as flowcharts or even proper engineering schematics within a Qt application.
https://simulton.com
MIT License
231 stars 60 forks source link

Background Dots and Highlighted Objects. #66

Closed TobiasWallner closed 4 months ago

TobiasWallner commented 6 months ago

As it looks like the default background of a scene has some dots/grid pattern. Is it supposed to not stretch over the whole sceene? image


When I mark / click on an object it gets highlighted, but the highlight never fully disappears. Only a thin border around the object disappears. When I click on the object it looks like this: image

When I then unselect it it looks and stays like that: image

could that be an QT rendering issue?

Tectu commented 6 months ago

See #59

From what I know, the scene only resizes (into the positive direction) when adding items. If the item's bound box extends over the scene rect after moving it, it does not resize further. Whether this is an intentional design decision of the underlying Qt Graphics View Framework or configurable behavior I currently don't recall. In any case, we want to improve the way the background/grid is being handled anyway as discussed in the mentioned issue.

Try to set QSchematic::Scene::setSceneRect(0, 0, 1000, 1000); as a start.