From kde-devel Thu Feb 28 21:37:57 2002 From: Stefan Bellon Date: Thu, 28 Feb 2002 21:37:57 +0000 To: kde-devel Subject: Re: Problems with QTextEdit X-MARC-Message: https://marc.info/?l=kde-devel&m=101493240508803 On 26 Feb, you wrote: > On Tuesday 26 February 2002 09:15 am, Stefan Bellon wrote: [snip] > > I have 3.0.1 which is supplied with Debian unstable. Is this too > > old? > I'm not sure, there were some problems in this area which have either > been fixed for 3.0.1 or 3.0.2. Ok, today I have taken the time to compile 3.0.2 (which took 5 hours on my Pentium II 233 MHz notebook, sigh). But the problem is still not gone. I can scroll perfectly to the line with the following code: QRect rect = te->paragraphRect( line ); te->SetContentsPos( 0, rect.top() ); But as soon as I have a selection as well, say with the following code ... te->setSelectionAttributes( 1, red, true ); te->setSelection( startline, 0, stopline, 0, 1 ); ... then the above placement doesn't work anymore. The position of the canvas is adjusted in a way that four lines of the selection are shown at the top of the QTextEdit window. And the funny thing is, this is regardless of the order of the above two examples. If I set the selection first or if I scroll first and set the selection then, I always get "misplaced" scrolling. Any idea about that? TIA. Greetings, Stefan. -- Stefan Bellon * * PGP 2 and OpenPGP keys available from my home page 2 + 2 = 5 for suitably large values of 2. >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<