13

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).

1
  • You can try QTextEdit::setWindowFlags(Qt::FramelessWindowHint) Commented May 8, 2013 at 8:43

2 Answers 2

20

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); 
Sign up to request clarification or add additional context in comments.

Comments

0

To remove the border from a specific Object


  • Go to your Object's Properties in the UI

  • Open the styleSheet property

  • Add border: 0; and Click Ok.

To remove the border from all QTextEdit Objects in a specific Window


Let's do it for the MainWindow for example
In the MainWindow UI >> Properties >> styleSheet

Add this code

QTextEdit { border: 0; } 

After, You can notice that the border has already gone in the Preview (Alt+Shift+R).

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.