在Qt Creator示例中,搜索Image Viewer Example。
example: widgets/imageviewer
title: Image Viewer Exampleingroup: examples-widgets
brief: The example shows how to combine QLabel and QScrollArea to
display an image.
QLabel is typically used for displaying text,
but it can also display an image. QScrollArea provides a
scrolling view around another widget. If the child widget exceeds
the size of the frame, QScrollArea automatically provides scroll
bars.