Dear All
We setup our combo like this.
modKod->setQuery("SELECT kod, id FROM stok_kod UNION SELECT '', null ORDER BY kod");
comboStokKod->setModel(modKod);
comboStokKod->setModelColumn(0);
comboStokKod->setEditable(true);
QSqlQueryModel *modKod = new QSqlQueryModel();
modKod->setQuery("SELECT kod, id FROM stok_kod UNION SELECT '', null ORDER BY kod");
comboStokKod->setModel(modKod);
comboStokKod->setModelColumn(0);
comboStokKod->setEditable(true);
To copy to clipboard, switch view to plain text mode
But after that we get a value from another query that id = 5, after that I would like to change the combo to value id = 5?. Anyway I could do it?
Bookmarks