QT text font

16 views
Skip to first unread message

Janos Hunyadi

unread,
Nov 10, 2014, 10:00:01 AM11/10/14
to python_in...@googlegroups.com
I'm trying to get individual characters out of a QT polygon. Is there a way to check that which polygons are connected to which strings.

font = QtGui.QFont("Arial", 40)
stringA
= "This is a test"
path
= QtGui.QPainterPath()


path
.addText(QtCore.QPointF(0, 0), font, stringA)
poly
= path.toSubpathPolygons()

This way I get the polygons. Then I want to check if each polygon in the array is it inside the next one. For example if I have an " i " or an " o " character they are created of 2 polygons. Is there a way to determine this.
Janos
Reply all
Reply to author
Forward
0 new messages