Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/336.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python PyQT5-警告使用';退出'';退出';,或Ctrl-D退出jupyter笔记本中的应用程序_Python_Python 3.x_Ipython_Pyqt5 - Fatal编程技术网

Python PyQT5-警告使用';退出'';退出';,或Ctrl-D退出jupyter笔记本中的应用程序

Python PyQT5-警告使用';退出'';退出';,或Ctrl-D退出jupyter笔记本中的应用程序,python,python-3.x,ipython,pyqt5,Python,Python 3.x,Ipython,Pyqt5,我目前正在学习PyQt5,我已经遇到了它,并使用那里解释的解决方案解决了它,但从那时起,我看到了这个警告 An exception has occurred, use %tb to see the full traceback. SystemExit: 0 /home/aditya/anaconda3/lib/python3.6/site-packages/IPython/core/interactiveshell.py:2971: UserWarning: To exit: use '

我目前正在学习PyQt5,我已经遇到了它,并使用那里解释的解决方案解决了它,但从那时起,我看到了这个警告

An exception has occurred, use %tb to see the full traceback.

SystemExit: 0


/home/aditya/anaconda3/lib/python3.6/site-packages/IPython/core/interactiveshell.py:2971: UserWarning: To exit: use 
'exit', 'quit', or Ctrl-D.
warn("To exit: use 'exit', 'quit', or Ctrl-D.", stacklevel=1)
现在,我不知道这个警告是否有害。但是我该怎么解决这个问题呢


感谢您的帮助。谢谢

您正面临此错误,因为您正在代码sys.exit()函数中使用。它是从pyqt4到pyqt5实现的,pyqt5是最新的一个!我建议您不要使用sys.exit来代替此选项。您可以使用app=QApplication(sys.argv)app.exec_389;()app.quit()来终止窗口。

这是否回答了您的问题?