QT Development Android Setting icon and horizontal screen

Source: Internet
Author: User

After the successful compilation, there will be a android-build directory, the directory has a androidmanifest.xml file;

Build an Android folder in the project directory and put the Androidmanifest.xml into the Android folder;

Add the following phrase to the Pro:

Android_package_source_dir=$$PWD/android

Then modify the androidmanifest.xml file:

  1. android:screenorientation = "Landscape"   


The direction the activity displays in the screen. The property value can be one of the values listed in the following table:

"unspecified" Default value, the system selects the direction. Its use policy, and because of the specific context of the selection, may vary depending on the device.
"user" Use the user's current preferred orientation.
"behind" Use the same direction in the activity stack as the activity under that activity.
"landscape" Horizontal display (width is larger than height)
"portrait" Portrait display (height is larger than width)
"reverseLandscape" In contrast to the normal horizontal direction, it is introduced in API level 9.
"reversePortrait" In contrast to the normal longitudinal direction, it is introduced in API level 9.
"sensorLandscape" Horizontal display, but based on the device sensor, can be displayed in normal direction, or reverse display, in the API Level 9 is introduced.
"sensorPortrait" Vertical display, but based on the device sensor, can either be displayed in normal direction, or reverse display, in the API Level 9 is introduced.
"sensor" The direction of the display is determined by the direction sensor of the device. The display direction depends on how the user holds the device, and the direction of the display changes when the user rotates the device. However, by default, some devices do not rotate in all four directions, so to allow rotation in all four directions, use the Fullsensor property value.
"fullSensor" The direction of the display (4 directions) is determined by the direction sensor of the device, except that it allows the screen to have 4 display orientations, and the other is similar to when set to "sensor", which is usually done regardless of the device. For example, some devices typically do not use portrait or landscape inversion, but this setting will still cause such reversals. This value is introduced in API level 9.
"nosensor" The display direction of the screen does not refer to the physical direction sensor. The sensor is ignored, so the display does not rotate because the user is moving the device. In addition to this difference, the system rotates the orientation of the screen with the same policy as the "unspecified" setting.


You can open the androidmanifest.xml file in Qt and directly modify the program's icon


QT Development Android Setting icon and horizontal screen

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.