Hello,
I have the code:
public void color()
{
QColor color = QColorDialog.getColor(textEdit.textColor(), this);
if (!color.isValid())
return;
editor.setTextColor(color);
}
private void setupEditor()
{
QFont font = new QFont();
font.setFamily("Arial");
font.setFixedPitch(true);
font.setPointSize(10);
editor = new CodeEditor();
editor.setLineWrapMode(QPlainTextEdit.LineWrapMode.NoWrap);
editor.setFont(font);
new Highlighter(editor.document());
}
but the error is :
The method setTextColor(QColor) is undefined for the type QPlainTextEdit
Why ?