You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
373 B
C++
24 lines
373 B
C++
#include "cscrollarea.h"
|
|
|
|
#include <QPainter>
|
|
|
|
cScrollArea::cScrollArea(QWidget* parent) :
|
|
QScrollArea(parent)
|
|
{
|
|
}
|
|
|
|
void cScrollArea::setPixmap(const QPixmap& pixmap)
|
|
{
|
|
m_pixmap = pixmap;
|
|
}
|
|
|
|
void cScrollArea::paintEvent(QPaintEvent *event)
|
|
{
|
|
if(!m_pixmap.isNull())
|
|
{
|
|
QPainter painter(this);
|
|
painter.drawPixmap(0, 0, m_pixmap);
|
|
}
|
|
QScrollArea::paintEvent(event);
|
|
}
|