summaryrefslogtreecommitdiffstats
path: root/examples/widgets/doc
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@theqtcompany.com>2015-07-17 15:06:22 +0200
committerSimon Hausmann <simon.hausmann@theqtcompany.com>2015-07-17 16:35:42 +0200
commitb2603b76655ac819e43c063bb6f16bc95f358083 (patch)
tree0fbe2c367ebfffdb70e9e3f21a7cf408bafd9626 /examples/widgets/doc
parent99b94aadf875c822afb6c2580e43355ac392ac92 (diff)
parent756266d01560157b7274e466b9ffc1b0e2ef9a1f (diff)
Merge remote-tracking branch 'origin/5.5' into HEAD
Conflicts: src/plugins/platforms/windows/qwindowsopengltester.cpp Change-Id: Ia7abeba9395ccf84e2fa81b91a5725a86dedb9fe
Diffstat (limited to 'examples/widgets/doc')
-rw-r--r--examples/widgets/doc/src/imageviewer.qdoc14
1 files changed, 10 insertions, 4 deletions
diff --git a/examples/widgets/doc/src/imageviewer.qdoc b/examples/widgets/doc/src/imageviewer.qdoc
index 901d6fe76e..91ae56b5d7 100644
--- a/examples/widgets/doc/src/imageviewer.qdoc
+++ b/examples/widgets/doc/src/imageviewer.qdoc
@@ -124,10 +124,16 @@
\snippet widgets/imageviewer/imageviewer.cpp 2
- In the \c loadFile() function, we check if the file's
- format is an image format by constructing a QImage which tries to
- load the image from the file. If the constructor returns a null
- image, we use a QMessageBox to alert the user.
+ In the \c loadFile() function, we instantiate a QImageReader
+ and enable automatic transformations by calling
+ QImageReader::setAutoTransform(). For files in JPEG format,
+ this ensures that portrait mode images of digital cameras are shown
+ correctly by applying the appropriate orientation read from the
+ EXIF meta data stored in the image file.
+
+ We then load the image using QImageReader::read(). If this returns
+ a null image, indicating that the file is not an image file,
+ we use a QMessageBox to alert the user.
The QMessageBox class provides a modal dialog with a short
message, an icon, and some buttons. As with QFileDialog the