How to protect Sqlite3 database with password that using in desktop application
Sqlite doesn't come with encryption built in, however you can enable encryption in sqlite by either purchasing the official paid extension here for $2000. Or you can take a chance on one of the free alternative like this one. I have no idea how well the free versions will work, but I imagine the paid one is quite robust and up to date.
You will also need to build a custom qt sql driver by following the instructions here. And finally you must run this sql immediately after opening the database
PRAGMA key='your-secret-key';