the query is containing numbers of employees , the combo box containing there names, so i sorted the query by the names alphabet like this :
Qt Code:
query.exec("select emp_no from employees order by name;");To copy to clipboard, switch view to plain text mode
i want to synchronize the line Edit with the combo box so when user enter number to the line edit , i should get the index of that number on the query and send the index to the combo box to be its current index number.
Instead of alway query the database set the id direct as user data to your combo box. then simply loop through the box and check there. Or if it is a long combo box create a local index hash.
tinysoft (3rd May 2010)
Bookmarks