A better way to write SQL in qt.