Hi!
How can I set the color of text in QTextEdit without using styles and html formatting (text is readonly). setTextColor not working
And one more question. How can I set margin at the left or right border?
Hi!
How can I set the color of text in QTextEdit without using styles and html formatting (text is readonly). setTextColor not working
And one more question. How can I set margin at the left or right border?
Try this:
Qt Code:
textEdit->setPalette(p);To copy to clipboard, switch view to plain text mode
What do you mean by margin?
Do you want an offset for the text displayed by the text edit?
Regards
What do you need an offset for?
Do you want to insert something in at the left of the text( icons, widgets, etc )?
If this is the case, then you can use QAbstractScrollArea::setViewportMargins to make some room for what you need to add.
Regards
Bookmarks