No name 'QSqlDatabase' in module 'PyQt5.QtSql'pylint(no-name-in-module) code example
Example: No name 'QMessageBox' in module 'PyQt5.QtWidgets'
VS Code in Preferences: Open Settings (JSON) and adding this line to the dict:
"python.linting.pylintArgs": ["--errors-only,--extension-pkg-whitelist=PyQt5"]