Ok so what i want to do is populate a combobox with the results from a query.
I have my query which is:

Qt Code:
  1. QString querystring = "SELECT u.UserID, f.FileName, f.FileLocation, s.Size, s.Finished FROM users u JOIN stats s ON s.UserID = u.UserID JOIN file f ON s.FileID = Q.FileID WHERE u.UserID = 1";
To copy to clipboard, switch view to plain text mode 


What I want to do is populate a combobox with the FileName and when a button is pressed, the selected file within the comobobox is loaded. How would i go about doing this? I can populate the combobox with all the FileNames, but i don't know how to load the file based on this. How do i pass the filelocation onto the relevant function? Could someone please help?

Thanks for your time and trouble