c++ - Qt5.4/QML: How to determine wether the orientation of the screen is inverted or not -
i'm creating ios video camera app using qt5.4. need determine current orientation of device rotate video in videooutput element.
as can see there's autoorientation property doesn't work expect: if keep switching orientation starts have weird behaviour i.e. setting wrong orientation.
then tried apply rotation based on screen.primaryorientation property: copying function defined in this example, i've created similar version, can find here.
i call every time width or height changes, this:
onwidthchanged: { video.orientation = changeorientation(); } onheightchanged: { video.orientation = changeorientation(); } however, seems inverted orientations ignored, strange since listed in the documentation.
anyone has idea why it's happening?
update: isolate problem when using autoorientation, there's menu on top of videooutput, menu rowlayout, it's visible if user clicks on menu icon, , if user clicks on menu icon orientation gets messy.
however, in situation invertedportrait not recognized.
Comments
Post a Comment