Application width & height

191 views
Skip to first unread message

İsmail Dönmez

unread,
Jul 6, 2010, 10:40:13 AM7/6/10
to andro...@googlegroups.com
Hi;

I am running in a 1024x600 emulator but the Qt examples always show up in smaller than the actual screen size. Is there a way to change the screen size?

Regards,
ismail

BogDan

unread,
Jul 10, 2010, 9:52:50 AM7/10/10
to android-qt
Hi,

Hmm.. It seems you find a bug. I'll take a look at it this weekend.
Thanks for your report.

P.S. I'm sorry for delayed answer, I was traveling a lot this days and
I didn't have an internet connection.

BogDan.

İsmail Dönmez

unread,
Jul 10, 2010, 9:54:08 AM7/10/10
to andro...@googlegroups.com

BogDan you did a great job; no worries. And big thanks!

İsmail Dönmez

unread,
Aug 6, 2010, 4:44:37 AM8/6/10
to andro...@googlegroups.com
Hi again;

I tested latest android-4.7 branch and my 800x480 app still does not fit in a 800x480 device, the application is like zoomed. Any ideas how to fix this?

Regards,
ismail

İsmail Dönmez

unread,
Aug 6, 2010, 5:28:29 AM8/6/10
to andro...@googlegroups.com
Hi;

One thing though; I see the following in the logs;

I/Qt JAVA ( 1910): Desktop onSizeChanged:320,508
D/Qt      ( 1910): setDisplayMetrics 

So the device might not be 800x480 but lower resolution, is there a way to double check this?

Regards,
ismail

İsmail Dönmez

unread,
Aug 6, 2010, 5:37:39 AM8/6/10
to andro...@googlegroups.com
Ok, I checked in browser via JavaScript and screen resolution shows up as 480x800 so there should be a problem with the Qt port.

Regards,
ismail

İsmail Dönmez

unread,
Aug 10, 2010, 6:47:13 AM8/10/10
to andro...@googlegroups.com
Here is the more complete log, notice that screen actually sends it size correctly (well , w=479, h=799) but the widget is wrong size;

I/Qt      ( 1742): qt start
D/Qt      ( 1742): startQtAndroidPlugin 
D/Qt      ( 1742): startQtApp 
D/Qt      ( 1742): startMainMethod 
W/Qt      ( 1742): WARNING: QApplication was not created in the main() thread.
I/Qt JAVA ( 1742): onCreate
I/Qt JAVA ( 1742): onResume
D/Qt      ( 1742): resumeQtApp 
D/Qt      ( 1742): ("android", "androidGL") 
D/Qt      ( 1742): QAndroidPlatformIntegrationPlugin::create "android" 
I/Qt JAVA ( 1742): Desktop onSizeChanged:320,508                <============ WRONG SIZE
D/Qt      ( 1742): setDisplayMetrics 
I/ActivityManager(  968): Displayed activity org.animatedtiles.qt/.QtMain: 1094 ms (total 1094 ms)
D/Qt      ( 1742): QAndroidPlatformIntegration::createPlatformWindow QWidget(0x3ab2b0) 
D/Qt      ( 1742): createWindow false 1 -80 -146 399 653 
D/dalvikvm( 1742): GC freed 741 objects / 58768 bytes in 86ms
I/Qt JAVA ( 1742): id:1 WindowVisibilityChanged:0
D/Qt      ( 1742): windowCreated 1 
D/Qt      ( 1742): QAndroidPlatformIntegration::createWindowSurface QWidget(0x3ab2b0) 
D/Qt      ( 1742): QAndroidPlatformWindow::setWindowFlags QFlags(0x1|0x800) 
I/Qt JAVA ( 1742): onSizeChanged id:1 w:320 h:508 oldw:0oldh:0 reqw:479reqh799 <====== WRONG SIZE
I/Qt JAVA ( 1742): onSizeChanged id:1 w:479 h:799 oldw:320oldh:508 reqw:479reqh799 <========== CORRECT! SIZE
D/Qt      ( 1742): resizeWindow 1 0 0 319 507 <============= WRONG SIZE
D/Qt      ( 1742): windowChanged 1 
I/Qt JAVA ( 1742): onSizeChanged id:1 w:319 h:507 oldw:479oldh:799 reqw:319reqh507 <==== WRONG SIZE AGAIN
I/Qt JAVA ( 1742): setSurfaceVisiblity 1 visible true

BogDan

unread,
Aug 14, 2010, 1:24:12 PM8/14/10
to android-qt
Hi,

I juts fixed, please use the latest git.

Best regards.
BogDan.

İsmail Dönmez

unread,
Aug 14, 2010, 1:32:02 PM8/14/10
to andro...@googlegroups.com
Nice, I'll test next week. After that I can bug you with how to use Qt plugins and how to call native Android methods inside Qt :-)

Regards,
ismail

İsmail Dönmez

unread,
Aug 16, 2010, 3:01:01 AM8/16/10
to andro...@googlegroups.com
This finally fixes the problem, you rock! :)

Renu Verma

unread,
May 16, 2013, 2:30:29 PM5/16/13
to andro...@googlegroups.com
Hi,

I was wondering, what is exact height and width of Android app when we design it. There several. Just want to confirm very normal which can be work in all A phone.

Thanks
Reply all
Reply to author
Forward
0 new messages