[Qt-jambi-interest] QCompleter with QSqlQueryModel problem.
Gunnar Sletta
gunnar at trolltech.com
Mon Aug 11 08:10:23 CEST 2008
José Arcángel Salazar Delgado wrote:
> Hi,
>
> I'm Having some troubles trying to set a QCompleter into a QLineEdit.
>
> This is what I´m Doing:
>
> QComplete completer= new QCompleter();
> completer.setModel(Familias.tableModel());
> completer.setCompletionColumn(1);
> ui.familiaLineEdit.setCompleter(completer);
>
> The tableModel() method return a QSqlQueryModel with the following query:
>
> "SELECT id, nombre from familias"; //id is int, nombre is String
>
> The expected behavior (I guess) it's that complete using "nombres", but
> instead, do something strange: The listView, display the ids, and when I
> select a number (id), complete the "nombre" String in the LineEdit.
>
> I'm doing something bad, or this is a bug?
Hi Jose,
This looks like a bug. I've filed it with the wigets team to look into.
best regards,
Gunnar
More information about the Qt-jambi-interest
mailing list