Your QSqlTableModel does not have a database connection to work with, see second constructor argument.
Also the given table name is wrong (your table is not called "library data", just "library").
Cheers,
_
P.S.: A Sqlite database is a single file, you don't need username or password for that.
Bookmarks