Results 1 to 5 of 5

Thread: Qt Controls so small on Android

  1. #1

    Question Qt Controls so small on Android

    I'm having problems using Qt Controls such as QScrollBar, QSpinBox, QCheckBox and QTabBar on Qt 5.3.1. The application for Windows is perfect but when I compile it for Android those controls just reduce the size. I'm sure that it's related to the fact of the PPI (pixels per inch) of my Galaxy S4 screen but I don't know how to solve it. I'm using Qt Widgets (no QML) and I tried to use Style Sheets to solve this problem but it isn't a good idea once the size is variable according to the device which my application will be deployed. Has someone a solution?

  2. #2
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qt Controls so small on Android

    If you are using QWidgets,,, are you using them through layouts ? or is it static placement of the widgets ?

  3. #3

    Default Re: Qt Controls so small on Android

    Quote Originally Posted by aamer4yu View Post
    If you are using QWidgets,,, are you using them through layouts ? or is it static placement of the widgets ?
    I'm using widgets with layout management. Everything is ok about layout unless the Checkbox, spinbox, scrollbar, tabbar scroll buttons. I wish qt could have a measure unit for dp (independent pixel) instead of px (physical pixel). Sincerely.

  4. #4
    Join Date
    Jan 2012
    Location
    Dortmund, Germany
    Posts
    159
    Thanks
    69
    Thanked 10 Times in 8 Posts
    Qt products
    Qt4
    Platforms
    Windows Android

    Default Re: Qt Controls so small on Android

    You can use logicalDPI, which might on the one hand be a better bet (the physicalDPI result changes in runtime on startup...!), on the other hand, the value of logicalDPI is not correct. I have yet to find out if it is incorrect in a consequential and predictable way among different devices.

  5. #5

    Default Re: Qt Controls so small on Android

    How can I use a logicalDPI. Can you give a example?

Similar Threads

  1. Replies: 4
    Last Post: 10th July 2014, 15:22
  2. Android ARM vs Android x86 in qmake .pro file
    By sedi in forum Qt Programming
    Replies: 1
    Last Post: 12th May 2014, 08:48
  3. How do you make android applications display correctly on android phone?
    By Cyrebo in forum Qt for Embedded and Mobile
    Replies: 1
    Last Post: 17th August 2013, 07:31
  4. is android app with qt 5.1 just compatible with android 4 ?
    By solook in forum Qt for Embedded and Mobile
    Replies: 5
    Last Post: 14th August 2013, 16:23
  5. Hiding controls changes spacing of other controls
    By MrGarbage in forum Qt Programming
    Replies: 1
    Last Post: 18th December 2007, 20:47

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.