I want to start learing creating menu's, so, this is a script i found for testing. There are no faults in it, but he doesn't show a window with the menu's. I have looked for the reason and the problem is that he can't find the sys.
First the code I use:
import sys
print(sys.path)
sys.path.insert(0,'C:\anaconda3\Lib\site-packages')
from qtpy.QtCore import Qt
from qtpy.QtWidgets import QApplication, QLabel, QMainWindow
class Window(QMainWindow):
def _init_(self, parent=None):
super()._init_(parent)
self.setWindowTitle("Probeersel")
self.resize(400, 200)
self.centralWidget = QLabel("Hello")
self.centralWidget.setAlignment(Qt.AlignHCenter | Qt.AlingVCenter)
self.setCentralWidget(self.centralWidget)
if __name__ == "_main_":
app = QApplication(sys.argv)
win = Window()
win.show()
sys.exit(app.exec_())
I have allready uninstall anaconda and reinstall it. But, the same thing, not working. I have put my save in the anaconda folder, but still not working.
I have looked all ready her to find a solution, but no, still not working :(