diff options
Diffstat (limited to 'examples/surfacechart/main.cpp')
-rw-r--r-- | examples/surfacechart/main.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/examples/surfacechart/main.cpp b/examples/surfacechart/main.cpp index 00f3a1c9..370993df 100644 --- a/examples/surfacechart/main.cpp +++ b/examples/surfacechart/main.cpp @@ -122,9 +122,10 @@ int main(int argc, char *argv[]) axisMinSliderZ->setEnabled(true); QLinearGradient gr(0, 0, 100, 1); - gr.setColorAt(0.0, Qt::blue); - gr.setColorAt(0.5, Qt::yellow); - gr.setColorAt(1.0, Qt::red); + gr.setColorAt(0.0, Qt::black); + gr.setColorAt(0.33, Qt::blue); + gr.setColorAt(0.67, Qt::red); + gr.setColorAt(1.0, Qt::yellow); QPixmap pm(100, 24); QPainter pmp(&pm); pmp.setBrush(QBrush(gr)); @@ -217,7 +218,7 @@ int main(int argc, char *argv[]) QObject::connect(axisMinSliderZ, &QSlider::valueChanged, modifier, &ChartModifier::adjustZMin); QObject::connect(colorPB, &QPushButton::pressed, - modifier, &ChartModifier::colorPressed); + modifier, &ChartModifier::gradientPressed); QObject::connect(fontList, &QFontComboBox::currentFontChanged, modifier, &ChartModifier::changeFont); QObject::connect(labelButton, &QPushButton::clicked, |