You can use QtSql also without ItemView.

Qt Code:
  1. QString query="SELECT *FROM SKM_T_AIS_CURRENTSHIPLIST where" +type+ " ='" +searchKey +";";
To copy to clipboard, switch view to plain text mode 

print the value of query;