[SailfishDevel] Landscape Orientation without Silica

Gunnar Sletta gunnar at sletta.org
Thu Oct 2 05:19:48 UTC 2014


On 01 Oct 2014, at 22:22, Adam Pigg <adam at piggz.co.uk> wrote:

> Hi
> 
> Is is possible to force an application into landscape orientation, when only using a plain QQuickWindow and QML/QtQuick2 without using silica components/applications/pages?
> 
> Ive tried creating a sub item of my root item that is rotated 90 degrees but it ends up being offset, and I feel it should be easier!
> 
> Cheers
> 
> Adam

This should do the trick:

Item {
    id: root

    width: 540
    height: 960

    Item {
        id: contentRoot  
        width: parent.height
 	height: parent.width
	anchors.centerIn: parent
	rotation: 90

        ApplicationGoesHere {
	    ...
	}
    }
}

cheers,
Gunnar

www.sletta.org
> _______________________________________________
> SailfishOS.org Devel mailing list
> To unsubscribe, please send a mail to devel-unsubscribe at lists.sailfishos.org




More information about the Devel mailing list