I thought there was a simple way to do this but I haven't found one yet. What I want to do is to allow my QTextEdit content to use the whole area. It seems like there's a text margin of a few pixels by default and I have no idea how to remove it. The following picture displays my problem with the text margin:
normal.png
I couldn't find anything super useful in the help section of Qt Creator so I thought maybe setting the style sheet was a good idea but nope. If I set a margin, it only applies to the textedit itself, obviously.
margin.png
Padding only applies a padding to the textedit itself, at the same time giving the content a kind of margin.
padding.png
This isn't surprising since QTextEdit supports the box model.
I've also tried to set the content margins
textedit->setContentMargins(0,0,0,0);
textedit->setContentMargins(0,0,0,0);
To copy to clipboard, switch view to plain text mode
without success.
So my question is, how to remove the text margin in a QTextEdit?
Thanks!
Bookmarks