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

Position of edited Text in Elementeditor is wrong #158

Open
Murmele opened this issue Mar 14, 2021 · 0 comments
Open

Position of edited Text in Elementeditor is wrong #158

Murmele opened this issue Mar 14, 2021 · 0 comments

Comments

@Murmele
Copy link
Contributor

Murmele commented Mar 14, 2021

  1. edit an existing Element.
  2. Add a new PartText (write into the text you would like to see)
  3. Change size of the text
  4. Save edited element
  5. Close Element editor
  6. Open Element editor for the edited element again
  7. Check Position of the Text you set before. It is moved a little bit (I think it depends on the new size)

I found this:
QRectF PartText::boundingRect() const{
QRectF r = QGraphicsTextItem::boundingRect();
r.adjust(0.0, -1.1, 0.0, 0.0);
return(r);
}

why do I have to adjust the bounding Rect by a fixed factor?

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

1 participant