QGraphicsTextItem: Hyphen breaks string selection (non word character)
Unsolved
General and Desktop
-
PySide2:
I have
QGraphicsTextItem
with just one long string in it.If double-click on the string I can select it. But if I have a hyphen in the string, the selection will stop at the hypen.
So for example if I have the string
ABC-DEF
I can either selectABC
,-
orDEF
, but NOT the fullABC-DEF
.I think the problem is that the hypen is not a word character. Where can I change this?
-
@MS_GX said in QGraphicsTextItem: Hyphen breaks string selection (non word character):
Where can I change this?
In QTextEngine::atWordSeparator() by compiling Qt by yourself. So basically - nowhere except you implement your own doubleClick behavior.
-
The text can found in QGraphicsTextItem::document()