+
+ char s[256];
+ int boxes, spots;
+ CountBoxesAndSpots(boxes, spots);
+
+ if (boxes == spots)
+ sprintf(s, "Boxes = Spots");
+ else if (boxes < spots)
+ sprintf(s, "Need %i more box%s", spots - boxes, (spots - boxes == 1 ? "" : "es"));
+ else if (spots < boxes)
+ sprintf(s, "Need %i more spot%s", boxes - spots, (boxes - spots == 1 ? "" : "s"));
+
+ painter.setPen(Qt::blue);
+ painter.drawText(0, 0, clientArea.width(), clientArea.height(),
+ Qt::AlignRight | Qt::AlignBottom, QString(s));