How to make QTextEdit with no visible border?

akalenuk picture akalenuk · May 8, 2013 · Viewed 7.6k times · Source

When I create a deafult QTextEdit widget, it appears in a default Windows style border. I don't want this border, so I try to turn it off. How do I do that?

I'm using pretty old version of Qt (3.2.3).

Answer

thuga picture thuga · May 8, 2013

If i understand the question correctly, you can set the frame style to no frame using the setFrameStyle() function.

Heres an example:

QTextEdit *text_edit = new QTextEdit(this);
text_edit->setFrameStyle(QFrame::NoFrame);