do the proxy widget resize first, so that the edit rect is correct

svn path=/trunk/KDE/kdelibs/; revision=1112338
This commit is contained in:
Aaron J. Seigo 2010-04-07 21:45:09 +00:00
parent 9eecf8ba7c
commit 3ec50c411f

View File

@ -181,13 +181,13 @@ void SpinBox::hoverLeaveEvent(QGraphicsSceneHoverEvent *event)
void SpinBox::resizeEvent(QGraphicsSceneResizeEvent *event)
{
QGraphicsProxyWidget::resizeEvent(event);
QStyleOptionSpinBox spinOpt;
spinOpt.initFrom(nativeWidget());
QRect controlrect = nativeWidget()->style()->subControlRect(QStyle::CC_SpinBox, &spinOpt, QStyle::SC_SpinBoxFrame, nativeWidget());
if (d->focusIndicator) {
d->focusIndicator->setCustomGeometry(controlrect);
}
QGraphicsProxyWidget::resizeEvent(event);
}
void SpinBox::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)