[英]segmentation fault when using PyQtChart
我剛剛安裝了PyQtChart 5.7。 但是我在創建QChart對象時遇到了分段錯誤。 我的代碼真的很簡單,就像這樣。
from PyQt5.QtChart import QChart
chart = QChart()
當我運行它
[1] 27902 segmentation fault (core dumped)
您應該有一個QApplication
對象。
from PyQt5.QtChart import QChart
from PyQt5.Qt import QApplication
import sys
a = QApplication(sys.argv)
chart = QChart()
a.exec()
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.