How to create an SQL Function in QSqlDatabase? The method, described in Adding a custom sqlite function to a Qt application it doesn't work. When sqlite3_create_function is called, the program crashes, although there is a call to sqlite3_initialize. QSqlDatabase uses C:/Qt/5.15.0/msvc2019_64/plugins/sqldrivers/qsqlite.dll, and sqlite3_create_function is called from sqlite3.c, added to the project. I added sqlite3.c because the linker does not find sqlite3_create_function