If you follow the documentation at http://doc.trolltech.com/4.6/model-v...ogramming.html exactly with the SQL as your model, then that might be what you're looking for.

But if you want it to be robust, don't use Qt.