[SailfishDevel] Landscape Orientation without Silica
Adam Pigg
adam at piggz.co.uk
Thu Oct 2 18:21:24 UTC 2014
Cheers, i'd done all that but missed the achors.centreIn!!!
On Thu, Oct 2, 2014 at 6:19 AM, Gunnar Sletta <gunnar at sletta.org> wrote:
>
> 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
>
>
> _______________________________________________
> SailfishOS.org Devel mailing list
> To unsubscribe, please send a mail to
> devel-unsubscribe at lists.sailfishos.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.sailfishos.org/pipermail/devel/attachments/20141002/b0db8d93/attachment.html>
More information about the Devel
mailing list