Reputation: 2695
Is there possible to use PyQt5 in Visual Studio 2015?
I installed PyQt and created python project. I get an error.
No module named 'PyQt5'
If there is a handler for this exception, the program may be safely continued.
What do I have to do?
import sys
from PyQt5 import QtWidgets
def main():
app = QtWidgets.QApplication(sys.argv)
window = QtWidgets.QMainWindow()
button = QtWidgets.QPushButton("Hello world")
window.setCentralWidget(button)
window.show()
app.exec_()
if __name__ == '__main__':
main()
Upvotes: 4
Views: 8379
Reputation: 11
Try this: In "Solution Explorer" choose "References"->"Add Reference"->"Browse"- tab, where select *.pyd files in (Python installation folder)\Python34\Lib\site-packages\PyQt4. Then in code one can use something like this: "from Qt import * "
Upvotes: 1