PDA

View Full Version : How to adjust Application geometry acording to device



call_from
27th October 2010, 06:34
How to adjust Application geometry acording to device

I have an app that works fine just in one device.
When I change the device in emulator, the app size turns not suitable for that device.

How can I get control over device resolution and application max size.

Thanks for any advice

aamer4yu
27th October 2010, 07:16
Use layouts properly and show your app in maximized or full screen state.

If you want fixed size, you can always query the screen geometry and re-size your app window accordingly.

call_from
28th October 2010, 20:18
Use layouts properly and show your app in maximized or full screen state.

If you want fixed size, you can always query the screen geometry and re-size your app window accordingly.

where and how call such resize?

I ve calling resize from main.cpp and from the class using a signal.

hasnain
30th October 2010, 12:58
i would also like to know how to achieve this. i have made layouts and items in my app window through drag/drop so their size is fixed. How i can resize each and every layout and item according to screen geometry. I have tried showmaximized() change the size of window but size of layouts item and widgets remains the same. suggest some example regarding this.

wysota
30th October 2010, 15:17
i have made layouts and items in my app window through drag/drop so their size is fixed.
If you say such a thing then most likely you didn't put widgets in layouts. If you don't know how to do that, read the docs or search the forum, there are countless threads about this "problem".

ardisaz
16th November 2010, 15:12
The same problem with me...
I used QWidget as main windows, and i put some QLabel on it. I set the window size using setGeomethry (0,0,360,640). When i do mainwindow.show(), or mainwindow.showMaximized(), or mainwindow.showFullScreen(), nothing happened.
Does anyone got the same problem with me?
thx