Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- >>> picture = QPicture()
- >>> painter = QPainter(picture)
- >>> picture.boundingRect()
- QRect(0,0,0,0)
- >>> painter.drawRect(20,20,50,50)
- >>> picture.boundingRect()
- QRect(20,20,50,50)
- >>> picture = QPicture()
- >>> painter = QPainter(picture)
- >>> picture.boundingRect()
- QRect(0,0,0,0)
- >>> painter.drawText(10,10, "Hello, World!")
- >>> picture.boundingRect()
- QRect(0,0,0,0)
- pic = Qt.QPicture()
- p = QtGui.QPainter(pic)
- brect = p.drawText(10,10,200,200, QtCore.Qt.AlignCenter, "blah")
- p.end()
- print brect
- print pic.boundingRect()
Add Comment
Please, Sign In to add comment