wagmare
29th July 2009, 13:26
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
string.insert(4, "\n"); //same as previous
string.insert(4, QChar::LineSeparator); //same as previous
this one is working fine if i use QGraphicsTextItem
please help me solving this issue ..
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
string.insert(4, "\n"); //same as previous
string.insert(4, QChar::LineSeparator); //same as previous
this one is working fine if i use QGraphicsTextItem
please help me solving this issue ..