PDA

View Full Version : landscape to portrait



Kunjal Garach
14th May 2010, 11:33
hi,

I am new to QT. I am using Touchscreen TFT with 800x840(Landscape) resolution. I started my TFT and Touch screen and in QT Example it works fine.

Actually my end product have dimension in 480x800 portrait. I need to use same LCD for that so i have to make all the widget in portrait mode and rotate at run time to display on TFT. This is possible in QT. QT have this type of function make landscape to portrait rotation.

Please reply if any one knows answer.

Kunjal

JD2000
14th May 2010, 12:18
I don't think you need to worry about this as its handled by the underlying 'operating system'. 'X' on *nix, DirectX on Windows etc

Kunjal Garach
15th May 2010, 05:38
My TFT size is 800 W x 480 H. But in my end product i want to show whole screen 480 W x 800 H so i need to rotate all the forms to 90 deg before it show on TFT. I make my form in qt create like 480 x 800 and before show to TFT I rotate it. Can it is possibel?

Kunjal

ChrisW67
16th May 2010, 22:53
Typically the OS would know, via the driver for the video, that the panel is oriented one way or the other and return the relevant sizes to the Qt systems. Qt layouts would then adjust to the available geometry.

Are you saying that the underlying operating system (what is it?) still thinks that the screen is oriented landscape (i.e. returns 800x480) when it is physically mounted in portrait orientation? You might be able to do something with QPainter transforms to effect the rotation but your layouts would not know that this was happening. I would expect that manually adjusting layouts is required.