hi friends,

i got a problem in QPainter::drawText()
i try to insert a new line "\n" to a QString text "Maintenance" as

string = "main \ntenance";

but it displayed as main[]tenance .. a box like undefined char is showing instead of
"main
tenance"

so i tried
Qt Code:
  1. string.insert(4, "\n"); //same as previous
  2. string.insert(4, QChar::LineSeparator); //same as previous
To copy to clipboard, switch view to plain text mode 

this one is working fine if i use QGraphicsTextItem

please help me solving this issue ..