I not make forward paint
..
but now ony resize window display a correct border why?
{
pen.setStyle( Qt::SolidLine );
pen.setWidth( 2 );
pen.setColor( option->palette.highlight().color() );
/////scene()->clearSelection();
////prepareGeometryChange();
painter->setPen( pen);
painter->drawRect (-2,-2,GetInt("large") + 4,GetInt("hight") + 4);
}
void paint(QPainter *painter,const QStyleOptionGraphicsItem *option,QWidget *widget)
{
QPen pen;
pen.setStyle( Qt::SolidLine );
pen.setWidth( 2 );
pen.setColor( option->palette.highlight().color() );
/////scene()->clearSelection();
////prepareGeometryChange();
painter->setPen( pen);
painter->drawRect (-2,-2,GetInt("large") + 4,GetInt("hight") + 4);
QGraphicsTextItem::paint(painter,option,widget);
}
To copy to clipboard, switch view to plain text mode
Bookmarks