@@ -367,7 +367,7 void ThemeWidget::updateUI() | |||
|
367 | 367 | } |
|
368 | 368 | else |
|
369 | 369 | foreach (QChartView *chartView, m_charts) { |
|
370 |
chartView->chart()->legend()->setAlignm |
|
|
370 | chartView->chart()->legend()->setAlignment(alignment); | |
|
371 | 371 | chartView->chart()->legend()->show(); |
|
372 | 372 | } |
|
373 | 373 | } |
@@ -67,7 +67,7 int main(int argc, char *argv[]) | |||
|
67 | 67 | |
|
68 | 68 | //![5] |
|
69 | 69 | chart->legend()->setVisible(true); |
|
70 |
chart->legend()->setAlignm |
|
|
70 | chart->legend()->setAlignment(QLegend::AlignmentBottom); | |
|
71 | 71 | chart->axisY()->setNiceNumbers(true); |
|
72 | 72 | //![5] |
|
73 | 73 |
@@ -67,7 +67,7 int main(int argc, char *argv[]) | |||
|
67 | 67 | |
|
68 | 68 | //![5] |
|
69 | 69 | chart->legend()->setVisible(true); |
|
70 |
chart->legend()->setAlignm |
|
|
70 | chart->legend()->setAlignment(QLegend::AlignmentBottom); | |
|
71 | 71 | //![5] |
|
72 | 72 | |
|
73 | 73 | //![6] |
@@ -41,7 +41,7 int main(int argc, char *argv[]) | |||
|
41 | 41 | chart->setTheme(QChart::ChartThemeLight); |
|
42 | 42 | chart->setAnimationOptions(QChart::AllAnimations); |
|
43 | 43 | chart->legend()->setVisible(true); |
|
44 |
chart->legend()->setAlignm |
|
|
44 | chart->legend()->setAlignment(QLegend::AlignmentRight); | |
|
45 | 45 | |
|
46 | 46 | QPieSeries* yearSeries = new QPieSeries(&window); |
|
47 | 47 | yearSeries->setName("Sales by year - All"); |
@@ -67,7 +67,7 int main(int argc, char *argv[]) | |||
|
67 | 67 | |
|
68 | 68 | //![5] |
|
69 | 69 | chart->legend()->setVisible(true); |
|
70 |
chart->legend()->setAlignm |
|
|
70 | chart->legend()->setAlignment(QLegend::AlignmentBottom); | |
|
71 | 71 | chart->axisY()->setNiceNumbers(true); |
|
72 | 72 | //![5] |
|
73 | 73 |
@@ -100,7 +100,7 int main(int argc, char *argv[]) | |||
|
100 | 100 | drilldownChart->axisX()->setGridLineVisible(false); |
|
101 | 101 | drilldownChart->axisY()->setNiceNumbers(true); |
|
102 | 102 | drilldownChart->legend()->setVisible(true); |
|
103 |
drilldownChart->legend()->setAlignm |
|
|
103 | drilldownChart->legend()->setAlignment(QLegend::AlignmentBottom); | |
|
104 | 104 | //! [7] |
|
105 | 105 | |
|
106 | 106 | QChartView *chartView = new QChartView(drilldownChart); |
@@ -169,7 +169,7 QPen QLegend::pen() const | |||
|
169 | 169 | Sets the \a alignment for legend. Legend tries to paint itself on the defined position in chart. |
|
170 | 170 | \sa QLegend::Alignment |
|
171 | 171 | */ |
|
172 |
void QLegend::setAlignm |
|
|
172 | void QLegend::setAlignment(QLegend::Alignments alignment) | |
|
173 | 173 | { |
|
174 | 174 | if(m_alignment!=alignment && m_attachedToChart) { |
|
175 | 175 | m_alignment = alignment; |
General Comments 0
You need to be logged in to leave comments.
Login now