Changed QSqlQueryModel to QSqlTableModel
Also added function that scans a directory for files