Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. How to check the physical screen size of your display?
Forum Updated to NodeBB v4.3 + New Features

How to check the physical screen size of your display?

Scheduled Pinned Locked Moved QML and Qt Quick
2 Posts 2 Posters 914 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.
  • M Offline
    M Offline
    mshefiti
    wrote on 22 Dec 2014, 20:01 last edited by
    #1

    Hi guys,

    I have been using the Screen Qml component, but that one does not offer a way to tell me the physical screen size, only the display size in pixels.

    The symbian Screen Component offers the "displayCategory":http://http://doc.qt.digia.com/qtquick-components-symbian-1.1/qml-screen.html, but symbian Components are not available for Qt 5.3, which I am actually using.

    How would you address with this problem.

    Thankssss

    1 Reply Last reply
    0
    • S Offline
      S Offline
      sierdzio
      Moderators
      wrote on 23 Dec 2014, 08:12 last edited by
      #2

      You can get it (although a bit unreliably) from QDesktopWidget, like this:
      @
      int heightMiliMeters = QDesktopWidget::screen()->heightMM();
      int widthMiliMeters = QDesktopWidget::screen()->widthMM();
      @

      (Z(:^

      1 Reply Last reply
      0

      2/2

      23 Dec 2014, 08:12

      • Login

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