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.
Qt includes a very simple method to get the size of the screen (width and height). Here it is:
QSize size = qApp->screens()->size();
Note that this function works perfectly in Android and iOS too.
Another thing to note is that if you replace  with 1, 2, 3, … you can access other monitors (if there are any) on desktop computers.