Hi,

Please help with this simple question: (Thank you!)

How would set the default "selected" item on my ListView Widget where the company "no" column equals 4 in the Sql Model below?

Qt Code:
  1. model ->setQuery(
  2. "SELECT no, name FROM company WHERE status = 'A' ORDER BY 1");
  3. listView->setModel(model);
  4. listView->setModelColumn(1);
To copy to clipboard, switch view to plain text mode