1 #include "imageviewer.h"
6 ImageViewer::ImageViewer(QWidget *parent)
13 p.fillRect(0, 0, 32, 32, Qt::white);
14 p.fillRect(0, 0, 16, 16, QColor(193, 193, 193));
15 p.fillRect(16, 16, 16, 16, QColor(193, 193, 193));
17 QPalette pal = scrollAreaWidgetContents->palette();
18 pal.setBrush(QPalette::Background,
20 pal.setBrush(QPalette::Base,
22 scrollAreaWidgetContents->setPalette(pal);
25 void ImageViewer::setImage(const QImage &image)
27 QPixmap px = QPixmap::fromImage(image);
28 imageLabel->setPixmap(px);
31 #include "imageviewer.moc"