QGraphicsView: edit text item in-place
Solved
General and Desktop
-
Hi guys,
please point me how can I do this issue?
When I put text item into QGraphicsView I need that user can edit that item in-place, like in most famous graphics editor.Thanks a lot.
-
-
@Alexey-Serebryakov
QGraphicsTextItem can edit in-place.
For relatively small scenes, this is a good solution.
Hoever, QGraphicsTextItem is relatively heavy, so if you need to create hundreds or thousands, expect delays loading the scene.My solution was to create a simple custom QGraphicsItem for just viewing the text, catching the events that start editing (e.g. double click) and placing a QGraphicsTextItem on top of the viewer item when edit started, redirecting focus there etc.
-