mero
28th March 2011, 02:38
Hello,
I have QTextEdit with:
mainTextEdit->append(strContent);
// align
if (strAlign == "center")
mainTextEdit->setAlignment(Qt::AlignCenter);
else
mainTextEdit->setAlignment(Qt::AlignLeft);
and everythink is ok,
but if I select by mouse text with align center and I add next text - text aligned center will be aligned left ....
(Qt::AlignCenter | Qt::AlignAbsolute) is not working..
setAligment should work only to last block not to text selected by mouse ...
any suggestion ?
I have QTextEdit with:
mainTextEdit->append(strContent);
// align
if (strAlign == "center")
mainTextEdit->setAlignment(Qt::AlignCenter);
else
mainTextEdit->setAlignment(Qt::AlignLeft);
and everythink is ok,
but if I select by mouse text with align center and I add next text - text aligned center will be aligned left ....
(Qt::AlignCenter | Qt::AlignAbsolute) is not working..
setAligment should work only to last block not to text selected by mouse ...
any suggestion ?