【发布时间】:2017-05-11 15:15:32
【问题描述】:
我对 QML 建模中的 Qt 图表有疑问。我有一个简单的应用程序,它实现了一个非常简单的 ChartView。当我运行应用程序时,它崩溃了,我在应用程序输出The program has unexpectedly finished 中收到错误。
我在我的 src.pro 中添加了
QT += qml quickcontrols2 charts
我的申请是这样的
import QtCharts 2.2
ApplicationWindow {
visible: true
width: 640
height: 480
title: qsTr("Hello World")
ChartView {
anchors.fill: parent
theme: ChartView.ChartThemeBrownSand
antialiasing: true
PieSeries {
id: pieSeries
PieSlice { label: "eaten"; value: 94.9 }
PieSlice { label: "not yet eaten"; value: 5.1 }
}
}
}
我怎么会遇到这个问题?
【问题讨论】:
-
堆栈跟踪在哪里?
-
检查doc。