运行没有问题,查后发现vscode中新的pylint默认不支持外部模块扩展,需在【用户设置】修改配置,如下:
{
"python.pythonPath": "D:\\Python\\Python36",
"pyqt-integration.qtdesigner.path": "c:\\Users\\bv\\venv\\Scripts\\designer.exe",
"editor.renderIndentGuides": false,
"explorer.confirmDelete": false,
"python.linting.pylintArgs": [
"--extension-pkg-whitelist=PyQt5"
]
}