Archived:Lock application orientation in Qt
Archived: This article is archived because it is not considered relevant for third-party developers creating commercial solutions today. If you think this article is still relevant, let us know by adding the template {{ReviewForRemovalFromArchive|user=~~~~|write your reason here}}.
Qt Quick should be used for all UI development on mobile devices. The approach described in this article (based on QWidget) is deprecated.
Qt Quick should be used for all UI development on mobile devices. The approach described in this article (based on QWidget) is deprecated.
This article shows how to lock the screen orientation of Qt apps in Qt 4.7.2 and later. Note that until Qt 4.7.1, on Symbian developers needed to use native code to lock screen orientation, as shown in Archived:Lock application orientation in Qt.
Article Metadata
Tested with
SDK: Qt SDK 1.1.3
Compatibility
Platform(s): Qt 4.7.2 and later
Article
Created: olympio
(03 Jun 2011)
Last edited: hamishwillee
(11 Oct 2012)
Code
Where MainWindow inherits from QMainWindow. The function setAttribute belongs to QWidget.


(no comments yet)