void CircleWidget::paintEvent(QPaintEvent * event)
{
QPainter painter(this); int wight = this->width();
int heigth = this->height(); if (m_timers==)
{ QColor green(, , 0xff);
QPen pen(green); painter.setBrush(QBrush(QColor(0x00, 0xFF, 0x00)));
pen.setStyle(Qt::DashLine);
painter.setPen(pen);
m_timers++;
}
else
{ QColor red(0xff, ,);
QPen pen(red); painter.setBrush(QBrush(QColor(0xFF,0x00,0x00)));
pen.setStyle(Qt::DashLine);
painter.setPen(pen);
m_timers = ;
}
painter.drawRect(, , , );
} void CircleWidget::timerEvent(QTimerEvent* event)
{
if (event->timerId() == m_TimerID)
{
update();
}
}