0

I have a QGraphicsView with icons inside QPlainTextEdit. View sticks fine to QPlainTextEdit's size and scrolls too, the problem is to set the height of the QGraphicsScene to the height of the view.

Scene size is set to match the view, with setSceneRect(), but has no effect. I colored the view with violet and scene with red to be sure.

enter image description here

Can you help me with this setback, please? I haven't found anyone with similar problem.

1 Answer 1

0

I was setting viewport()->setSceneRect() instead of viewport()->setSize(). It works now.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.