Hi,
I dont know this is a strange problem , or silly but i am stumbled..
I am using the following code to format my QTextEdit.
whenever i paste some colored text from some other location the color is visible as it is and if i press enter
the text "EnterHere>" also changing to same color as pasted text.
I am using "EnterHere>" as command promt
I tried using AutoFillFormat(None) but did not help.
please let me now if any body faced this before.
setFont(font);
setAutoFillBackground(true);
pl.setColor(pl.Base,Qt::black);
setPalette(pl);
mPrompt = "EnterHere>";
append(mPrompt);
QFont font("Arial",9,QFont::Courier,FALSE);
setFont(font);
QPalette pl;
setAutoFillBackground(true);
pl.setColor(pl.Base,Qt::black);
pl.setColor(QPalette::Text,Qt::white);
setPalette(pl);
mPrompt = "EnterHere>";
append(mPrompt);
To copy to clipboard, switch view to plain text mode
Added after 10 minutes:
Solved by using
setTextColor(Qt::white);
setTextColor(Qt::white);
To copy to clipboard, switch view to plain text mode
again after pressing enter.
Please let me know if any other way to disable the same
Bookmarks