- // Calc geometry
- QRect labelRect = style()->subElementRect(QStyle::SE_PushButtonContents, &opt, this);
- int shift = style()->pixelMetric(QStyle::PM_ButtonMargin);
- labelRect.adjust(shift, shift, -shift, -shift);
- int x, y, w, h;
- labelRect.getRect(&x, &y, &w, &h);