- QRect r = selectedDate->geometry();
- QRect s = mFontMetrics->boundingRect(selectedDateStr);
- QPoint p = QPoint(
- r.x() + r.width()/2 - s.height()/2 - mFontMetrics->descent(),
- - s.width()
- );
-
- painter.translate(r.width()/2, r.height()/2);
+ QRect q(y()-height(), x(), height(), width());