Hi,
I have customized QGraphicsTextItem, added into scene.
I want to align the text in that item.
I tried following way but unable to get results.
Please help me.
alignment - is Qt::Alignment
Qt Code:
txtBlockFormat.setAlignment(alignment); objCursor.setBlockFormat(txtBlockFormat); //or objCursor.mergeBlockFormat(txtBlockFormat); setTextCursor(objCursor);To copy to clipboard, switch view to plain text mode
The above code is supposed to align first block only.
I am expecting the results shown in attached image file.
Is there any other way to do it?
Thanks in advance.
Regards,
Sandip
Bookmarks