{
QRect rt
= pEvent
->rect
();
rt.setRight(rt.right() - 1);
rt.setBottom(rt.bottom() - 1);
painter.drawRect(rt);
calculateLayout(rt);
painter.drawRect(m_mainRect);
painter.
setRenderHint(QPainter::Antialiasing,
false);
painter.drawRoundedRect(m_header, 2, 2);
painter.drawRoundedRect(m_list, 2, 2);
}
void ChannelAxisList::paintEvent(QPaintEvent* pEvent)
{
QPainter painter(this);
QRect rt = pEvent->rect();
painter.setBrush(QBrush(QColor(255, 255, 255, 0)));
painter.setPen(QPen(QColor(255, 255, 255), 1));
rt.setRight(rt.right() - 1);
rt.setBottom(rt.bottom() - 1);
painter.drawRect(rt);
rt.setTopLeft(QPoint(0, 0));
calculateLayout(rt);
painter.setBrush(QBrush(QColor(255, 255, 255, 0)));
painter.setPen(QPen(QColor(255, 255, 255), 1));
painter.drawRect(m_mainRect);
painter.setBrush(QBrush(QColor(255, 0, 0)));
painter.setPen(QPen(QColor(0, 255, 0), 1));
painter.setRenderHint(QPainter::Antialiasing, false);
painter.drawRoundedRect(m_header, 2, 2);
painter.drawRoundedRect(m_list, 2, 2);
}
To copy to clipboard, switch view to plain text mode
Bookmarks