I want to have possibility of changing margins/indents in QTextEdit, without resizing QTextEdit.
What I mean is that when I use stylesheets:
	
	- textEdit->setStyleSheet("QTextEdit{margin-left: 30px; (...)}"); 
        textEdit->setStyleSheet("QTextEdit{margin-left: 30px; (...)}");
To copy to clipboard, switch view to plain text mode 
  the result looks like this:
1.png
QTextEdit is resized, and scroll bar is moved with it.
I would like to achieve something like this:
2.png
Margins/indents are within QTextEdit and scrollbar is on the right just by window frame.
I tried with:
	
	- textEdit->setStyleSheet("QTextEdit{text-indent: 60px}"); 
        textEdit->setStyleSheet("QTextEdit{text-indent: 60px}");
To copy to clipboard, switch view to plain text mode 
   but that doesn't work.
I also tried with QTextBlockFormat:
	
	- textBlockFormat = textCursor->blockFormat(); 
- textBlockFormat.setTopMargin(50); 
- textBlockFormat.setLeftMargin(50); 
        textCursor = new QTextCursor(textEdit->textCursor());
textBlockFormat = textCursor->blockFormat();
textBlockFormat.setTopMargin(50);
textBlockFormat.setLeftMargin(50);
To copy to clipboard, switch view to plain text mode 
   but that also doesn't work.
Anyone can guide me how to achieve this?
				
			
Bookmarks