To be able to set your Android app orientation (to Portrait or Landscape mode) in Qt you have to modify AndroidManifest.XML manually. In this post I am going to describe where you can find this “AndroidManifest.XML”, because it does not exist in your project folder by default and how to modify it to set any desired Screen Orientation for your App.
Updated: QImageReader class in Qt has a new method (introduced in Qt 5.5) named transformation() which you can use for this purpose but this article still applies if you are not using 5.5 or having problems with QImageRaader. Also it is a useful example on how to use GDI in Qt.
You might have also noticed that Qt reads jpg, tif and other types of images that it supports without paying any attention to EXIF information stored in them. EXIF meta data contains highly valuable information about the characteristics of a photograph. Let’s say you want to read an image file into QImage and do some process over it. It is crucial to know what type of orientation the image needs to go through right after reading it.Continue reading “How to read image orientation in Qt (Using stored EXIF)”