[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    [PyQt] qsqlquerymodel combobox items cleared
From:       Linos <info () linos ! es>
Date:       2007-11-26 16:50:16
Message-ID: 474AF948.9040905 () linos ! es
[Download RAW message or body]

Hello all,
	inside a dialog i populate the contents of a query in three comboboxes like this:

self.subfamiliaModel = QSqlQueryModel()
self.subfamiliaComboBox.setModel(self.subfamiliaModel)
self.subfamiliaModel.setQuery("SELECT SUBFAMILIA_ID & ' ' & NOMBRE FROM \
SCHEMA.MODELO_SUBFAMILIA ORDER BY EXPRESSION1", maxdb)
self.subfamiliaComboBox.setCurrentIndex(-1)

every combobox have his own model, this works well, it is a dialog that can be used \
many times because it is to search for items codes so i dont create it every time i \
load the dialog, instead i maintain in memory and in every exec i clear the filters \
of the lineedit and selections in comboboxes, i use 4 lineedits and 3 comboboxes but \
one of the comboboxes it is reloaded on every .exec_() to the dialog because his \
query and contents is changed while editing the other comboboxes. well all works very \
well but if a leave the program open any time (about 20 minutes) and exec the dialog, \
the two comboboxes with qsqlquerymodel that are not resetted in every load are empty. \
do qsqlquerymodel any timeout or anything alike? i cant find in documentation.

Best Regards,
Miguel Angel.
_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic