Re: [Interest] Insert without scrolling

2014-04-10 Thread Hugo Teso
Hi Tony, It did partially. Now, instead of scrolling to the top of the document, it scrolls up the same amount of lines that have been inserted. I tried to prevent this new scroll but with no success yet. Any ideas? Thanks, On 10/04/14 03:05, Tony Rietwyk wrote: Hi Hugo, Try using an

Re: [Interest] Insert without scrolling

2014-04-10 Thread Filip Piechocki
Hi Hugo, The text edit does not scroll up - it is rather your pasted text which pushes other lines down, while the current scroll stands still. So if you want to see exactly the same content as before pasting than you need to scroll down same amount of lines that have been inserted. Best

[Interest] Insert without scrolling

2014-04-09 Thread Hugo Teso
Hi, I am trying to insert some text at the top of a QPlainTextEdit. To do so I'm am using this lines of code: ui-textEdit-moveCursor(QTextCursor::Start, QTextCursor::MoveAnchor); ui-textEdit-insertPlainText(Some text here); The problem is that, by doing this, the textEdit is scrolled to the top

Re: [Interest] Insert without scrolling

2014-04-09 Thread Tony Rietwyk
Hi Hugo, Try using an explicit QTextCursor rather than the QTextEdit interfaces. Hope that helps, Tony -Original Message- Sent: Thursday, 10 April 2014 2:23 AM Hi, I am trying to insert some text at the top of a QPlainTextEdit. To do so I'm am using this lines of code: