Thanks for your reply.
so, I finally chose the manual approach like this:
QString queryStr
= QString("select id,value from woundType order by displayOrder");
query.exec(queryStr);
if (!query.isActive())
Logger
::log(Logger
::fatalLevel,
QString("200808131608: ") + qPrintable
(query.
lastError().
text()));
typeCbx->addItem("");
while (query.next()) {
typeCbx->addItem(query.value(1).toString());
typeCbx->setItemData(typeCbx->count()-1, query.value(0).toInt(), Qt::UserRole);
}
typeCbx->addItem("Ajout/Modification/Suppression");
typeCbx->addItem("Others");
QSqlQuery query;
QString queryStr = QString("select id,value from woundType order by displayOrder");
query.exec(queryStr);
if (!query.isActive())
Logger::log(Logger::fatalLevel, QString("200808131608: ") + qPrintable(query.lastError().text()));
typeCbx->addItem("");
while (query.next()) {
typeCbx->addItem(query.value(1).toString());
typeCbx->setItemData(typeCbx->count()-1, query.value(0).toInt(), Qt::UserRole);
}
typeCbx->addItem("Ajout/Modification/Suppression");
typeCbx->addItem("Others");
To copy to clipboard, switch view to plain text mode
which is the only one which really suits my needs but the counter part is more code to maintain...
the use of proxy is indeed maybe the best solution, I'll have a look.
All the best,
Oscar
Bookmarks