[QScintilla] [Bug report] autocompletion popup make application looses focus

Nicoleau Fabien nicoleau.fabien at gmail.com
Fri Dec 5 19:17:48 GMT 2008


Hi, 
Here is a bug report for qscintilla (tried with 2.3.1 and 2.3.2 ) :

Description of problem:
When autocompletion popup appears, the application looses focus. So I can't
type anything, select an item, or use escape key to hide the completion popup.
I must use the mouse to give focus to the application, to have a normal
situation.

How reproducible :

Steps to Reproduce:
1. Install qscintilla library
2. In an empty folder, write this code in a file called main.cpp :
#include <QApplication>
#include <Qsci/qsciscintilla.h>
#include <Qsci/qscilexercpp.h>
#include <Qsci/qsciapis.h>

int main(int argc, char* argv[])
{
    QApplication app(argc, argv);
    QsciScintilla *scintilla = new QsciScintilla;
    QsciLexerCPP *lexerCPP = new QsciLexerCPP;
    scintilla->setAutoCompletionThreshold(2);
    scintilla->setAutoCompletionSource(QsciScintilla::AcsAPIs);
    QsciAPIs apis(lexerCPP);
    apis.add("test");
    apis.add("test123");
    apis.add("foobar");
    apis.add("foobar2");
    apis.prepare();
    lexerCPP->setAPIs(&apis);
    scintilla->setLexer(lexerCPP);
    scintilla->show();
    return app.exec();
}

3. compile the created file
6. launch the executable file created.
7. In the application , type "fo". A popup will appear.

Actual results:
When popup appears, application looses focus. It's impossible to select an item
with the keyboard in the popup. It's also impossible to hide the popup with
escape key, or to continue typing. You must use the mouse, to select an item,
or click in blank text to hide the popup.


Expected results:
You should be able to select an item with keyboard, or hide the popup with
espace key, or continue typing. The application should not loose focus

Additional info:
Tried qscintilla-devel 2.3.1 and 2.3.2
Using qt-4.4.3
Using Linux (Fedora 10)
Using Gnome 2.24.1


Regards,

Nicoleau Fabien



More information about the QScintilla mailing list