Hi all,

I'm trying to find a method of selecting an item of a combo box populated from a SQL query model.

Qt Code:
  1. query1->setQuery("SELECT ID, Name FROM Cat order by Name");
  2. myQComboBox->setModel(query1);
  3. myQComboBox->setModelColumn(1);
To copy to clipboard, switch view to plain text mode 

Now I want to find data in the invisible column 0 that matches a given ID so I can set the combo box text from the index that's returned from the found record. I can't find a way of doing this. Is it possible ?