##// END OF EJS Templates
Fixed a bug in vanilla theme
Fixed a bug in vanilla theme

File last commit:

r486:7ab45bf9f776
r526:8593b87d6899
Show More
main.cpp
33 lines | 701 B | text/x-c | CppLexer
Jani Honkonen
Added piechart example
r128 #include <QtGui/QApplication>
#include <QMainWindow>
#include <qchartglobal.h>
Michal Klocek
Removes QChartWidget...
r136 #include <qchartview.h>
Jani Honkonen
Added piechart example
r128 #include <qpieseries.h>
Jani Honkonen
Refactor pie (again). QPieSlice's now emit signals and no id's anymore. Just pointers in the interface.
r203 #include <qpieslice.h>
Jani Honkonen
Added piechart example
r128
QTCOMMERCIALCHART_USE_NAMESPACE
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
Jani Honkonen
Refactor pie (again). QPieSlice's now emit signals and no id's anymore. Just pointers in the interface.
r203 QMainWindow window;
Jani Honkonen
Add pie example to pie series doc. Also made the basic pie example real simple. Have to add separate examples for customization.
r341 QChartView* chartView = new QChartView(&window);
//! [1]
Jani Honkonen
Refactor pie (again). QPieSlice's now emit signals and no id's anymore. Just pointers in the interface.
r203 QPieSeries *series = new QPieSeries();
Jani Honkonen
Add pie example to pie series doc. Also made the basic pie example real simple. Have to add separate examples for customization.
r341 series->add(1, "Slice 1");
Jani Honkonen
Refactor pie (again). QPieSlice's now emit signals and no id's anymore. Just pointers in the interface.
r203 series->add(2, "Slice 2");
series->add(3, "Slice 3");
series->add(4, "Slice 4");
series->add(5, "Slice 5");
Jani Honkonen
Clear background when there is only pie chart.
r293 chartView->addSeries(series);
Jani Honkonen
Add pie example to pie series doc. Also made the basic pie example real simple. Have to add separate examples for customization.
r341 //! [1]
Jani Honkonen
Refactor pie (again). QPieSlice's now emit signals and no id's anymore. Just pointers in the interface.
r203
window.setCentralWidget(chartView);
window.resize(600, 600);
window.show();
Jani Honkonen
Added piechart example
r128
return a.exec();
}