Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. How to get screen resolution from android devlce

How to get screen resolution from android devlce

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
1 Posts 1 Posters 624 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • kybernetesK Offline
    kybernetesK Offline
    kybernetes
    wrote on last edited by kybernetes
    #1

    I am trying to make a game for android. And I use qpainterpath class for my moving objects but all screens have different resolutions. So I use

    ScrW = qdesktopwidget::screensize.width;

    ScrH = qdesktopwidget::screensize.height;

    And used my staff that Proportional for example

    Box.addrect(x,y, scrW/10, scrH/12)

    To create a box but it doesn't work all devices, my stuff gets different ratio espacially text are get crazy because it's font size.

    NewBoxText.addText ("example");

    Is there anyway to do that easyly and perfect image.

    Maybe I can solve really good proportional calculation and get a little bite better but some of my stuff goes out side of screen so I think I couldn't get the right resolution. So it's get crazy a bite.

    I m new that stuff if u can give me and advise it will be pleasure for me.

    Thanks.

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved