diff examples/widgets/analogclock/AnalogClock.d @ 4:0a29ce1ae854

CMake build script. Small fixes in examples.
author SokoL_SD
date Wed, 13 May 2009 19:01:55 +0000
parents e78566595089
children 834feae7809b
line wrap: on
line diff
--- a/examples/widgets/analogclock/AnalogClock.d	Wed May 13 17:34:40 2009 +0000
+++ b/examples/widgets/analogclock/AnalogClock.d	Wed May 13 19:01:55 2009 +0000
@@ -64,16 +64,26 @@
 
     void paintEvent(QPaintEvent event)
     {
-        static const QPoint[3] hourHand = [
+/*        static const QPoint hourHand[3] = {
             QPoint(7, 8),
             QPoint(-7, 8),
             QPoint(0, -40)
-        ];
-        static const QPoint[3] minuteHand = [
+        };
+        static const QPoint minuteHand[3] = {
             QPoint(7, 8),
             QPoint(-7, 8),
             QPoint(0, -70)
-        ];
+        };
+*/
+        scope hourHand = new QPolygon;
+        hourHand.append(QPoint(7, 8));
+        hourHand.append(QPoint(-7, 8));
+        hourHand.append(QPoint(0, -40));
+
+        scope minuteHand = new QPolygon;
+        minuteHand.append(QPoint(7, 8));
+        minuteHand.append(QPoint(-7, 8));
+        minuteHand.append(QPoint(0, -70));
 
         scope hourColor = new QColor(127, 0, 127);
         scope minuteColor = new QColor(0, 127, 127, 191);