@@ -28,6 +28,7 DrilldownSlice::DrilldownSlice(qreal value, QString prefix, QSeries* drilldownSe | |||||
28 | { |
|
28 | { | |
29 | setValue(value); |
|
29 | setValue(value); | |
30 | updateLabel(); |
|
30 | updateLabel(); | |
|
31 | setLabelFont(QFont("Arial", 8)); | |||
31 | connect(this, SIGNAL(changed()), this, SLOT(updateLabel())); |
|
32 | connect(this, SIGNAL(changed()), this, SLOT(updateLabel())); | |
32 | connect(this, SIGNAL(hoverEnter()), this, SLOT(showHighlight())); |
|
33 | connect(this, SIGNAL(hoverEnter()), this, SLOT(showHighlight())); | |
33 | connect(this, SIGNAL(hoverLeave()), this, SLOT(hideHighlight())); |
|
34 | connect(this, SIGNAL(hoverLeave()), this, SLOT(hideHighlight())); |
@@ -49,7 +49,7 int main(int argc, char *argv[]) | |||||
49 | QList<QString> months; |
|
49 | QList<QString> months; | |
50 | months << "Jan" << "Feb" << "Mar" << "Apr" << "May" << "Jun" << "Jul" << "Aug" << "Sep" << "Oct" << "Nov" << "Dec"; |
|
50 | months << "Jan" << "Feb" << "Mar" << "Apr" << "May" << "Jun" << "Jul" << "Aug" << "Sep" << "Oct" << "Nov" << "Dec"; | |
51 | QList<QString> names; |
|
51 | QList<QString> names; | |
52 |
names << "Jane" << "John" << "Axel" << "Mary" << "S |
|
52 | names << "Jane" << "John" << "Axel" << "Mary" << "Susan" << "Bob"; | |
53 |
|
53 | |||
54 | foreach (QString name, names) { |
|
54 | foreach (QString name, names) { | |
55 | QPieSeries* series = new QPieSeries(&window); |
|
55 | QPieSeries* series = new QPieSeries(&window); | |
@@ -70,7 +70,7 int main(int argc, char *argv[]) | |||||
70 | QChartView* chartView = new QChartView(chart); |
|
70 | QChartView* chartView = new QChartView(chart); | |
71 | chartView->setRenderHint(QPainter::Antialiasing); |
|
71 | chartView->setRenderHint(QPainter::Antialiasing); | |
72 | window.setCentralWidget(chartView); |
|
72 | window.setCentralWidget(chartView); | |
73 |
window.resize(800, |
|
73 | window.resize(800, 500); | |
74 | window.show(); |
|
74 | window.show(); | |
75 |
|
75 | |||
76 | return a.exec(); |
|
76 | return a.exec(); |
General Comments 0
You need to be logged in to leave comments.
Login now