diff options
Diffstat (limited to 'examples')
-rw-r--r-- | examples/xmlpatterns/trafficinfo/mainwindow.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/examples/xmlpatterns/trafficinfo/mainwindow.cpp b/examples/xmlpatterns/trafficinfo/mainwindow.cpp index 428ed76..c6bd313 100644 --- a/examples/xmlpatterns/trafficinfo/mainwindow.cpp +++ b/examples/xmlpatterns/trafficinfo/mainwindow.cpp @@ -111,7 +111,9 @@ void MainWindow::mousePressEvent(QMouseEvent *event) void MainWindow::paintEvent(QPaintEvent*) { - QLinearGradient gradient(QPoint(width()/2, 0), QPoint(width()/2, height())); + const QPoint start(width()/2, 0); + const QPoint finalStop(width()/2, height()); + QLinearGradient gradient(start, finalStop); const QColor qtGreen(102, 176, 54); gradient.setColorAt(0, qtGreen.dark()); gradient.setColorAt(0.5, qtGreen); |