Hi,
I have a customized QGraphicsTextItem. By default the item is not editable. If one would like to change the content he has to double click the item:Now every time the blinking cursor is at the position 0, but I want the text cursor to be near the mouse double click position. (Like the result if one click the mouse button a third time.) Looking through QTextCursor, QTextDocument for a function like setTextCursorPos(QPoint) faild (I would like to use event->pos()). Even in the sources I don't figure out how the trolls do it in the mouse press reimp...Qt Code:
{ setTextInteractionFlags(Qt::TextEditorInteraction); }To copy to clipboard, switch view to plain text mode
Passing the event to QGraphicsTextItem::mouseDoubleClickEvent(event); or QGraphicsTextItem::mousePressEvent(event); ends in a total selection of the content.
Any suggestions?
Thanks
Bookmarks