QT += sql in PRO file
hope it can help