Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Change orientation by force on iOS/Android. How?
Forum Updated to NodeBB v4.3 + New Features

Change orientation by force on iOS/Android. How?

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
1 Posts 1 Posters 240 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    bogong
    wrote on last edited by
    #1

    Hello all!
    I need to change device orientation by force. I found solution by using native Objective-C/Java code, for example something like this for iOS on Objective-C:

    [[UIDevice currentDevice] setValue: [NSNumber numberWithInteger: UIInterfaceOrientationLandscapeLeft] forKey:@"orientation"];
    

    I've got it attached to button and on background it's working perfectly, I see signal appeared after changing on device:

    1617961673155 0x00006000009600a0 Orientation changed: Landscape inverted
    

    But QML UI doesn't redrawing. Is there any way to redraw it in accordance of new device orientation? Is there some signal that can help me with it?

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved