examples/graphicsview/simpleanchorlayout/main.cpp
changeset 33 3e2da88830cd
parent 30 5dc02b23752f
equal deleted inserted replaced
30:5dc02b23752f 33:3e2da88830cd
    47            QGraphicsItem *parent = 0)
    47            QGraphicsItem *parent = 0)
    48         : QGraphicsWidget(parent), caption(caption), color(color), textColor(textColor)
    48         : QGraphicsWidget(parent), caption(caption), color(color), textColor(textColor)
    49     {
    49     {
    50     }
    50     }
    51 
    51 
    52     void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0)
    52     void paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget * = 0)
    53     {
    53     {
    54         QFont font;
    54         QFont font;
    55         font.setPixelSize(0.75 * qMin(boundingRect().width(), boundingRect().height()));
    55         font.setPixelSize(0.75 * qMin(boundingRect().width(), boundingRect().height()));
    56 
    56 
    57         painter->fillRect(boundingRect(), color);
    57         painter->fillRect(boundingRect(), color);