[QScintilla] Row Col Problem

Phil Thompson phil at riverbankcomputing.com
Sat Feb 9 22:30:11 GMT 2008


On Saturday 09 February 2008, Patrick Mabie wrote:
> Hi Phil and all!
>
> Using: Visual Studio 2008,QScintilla-gpl-2-snapshot-20080120,Qt 4.3.3
>
> //Connection to this Signal
> void QsciScintilla::cursorPositionChanged (int line, int pos) [signal]
> connect(CurrentEditor(),SIGNAL(cursorPositionChanged
> (int,in)),this,SLOT(UpdateRowCol(int,int)))
>
> void MainWindow::processEvents()
> {
>     qApp->processEvents(QEventLoop::AllEvents);
> }
>
> void MainWindow::UpdateRowCol(int line,int pos)
> {
>     QString RowCol;
>     RowCol = QString(tr("Row%1 Col %2).arg(line).arg(pos));
>     statusBar()->showMessage(tr("Row      Col      "));
>     statusBar()->showMessage(RowCol);
>     processEvents();
> }
>
> I couldn't belive the lag that was involved with this , if you didn't
> let off the key it didn't update , I am not saying this is a bug or a
> problem , I just was wonder if you or anyone how come across this?

How can anybody tell? You need to provide a complete example if you want 
anybody to reproduce the problem.

What's the point of two consecutive calls to showMessage()? Why do you need to 
call processEvents()?

Phil


More information about the QScintilla mailing list