summaryrefslogtreecommitdiffstats
path: root/doc/src/snippets/code/src_gui_widgets_qscrollarea.cpp
blob: a77dc20443a824641e5d2a3c858e4a824f4533fe (plain)
1
2
3
4
5
6
7
8
9
//! [0]
QLabel *imageLabel = new QLabel;
QImage image("happyguy.png");
imageLabel->setPixmap(QPixmap::fromImage(image));

scrollArea = new QScrollArea;
scrollArea->setBackgroundRole(QPalette::Dark);
scrollArea->setWidget(imageLabel);
//! [0]