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. QML OpenGl layout issue with a retina screen
Forum Updated to NodeBB v4.3 + New Features

QML OpenGl layout issue with a retina screen

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
1 Posts 1 Posters 125 Views
  • 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.
  • J Offline
    J Offline
    julienchz
    wrote on last edited by
    #1

    Hi, I have an OpenGL window integrated in a software. With classic screen there is no problem with my openGl Window but with a retina screen ... problem. So I am using devicePixelRatio to fix the size of the window. But there is still a problem with anchors. I am using the property anchors.fill: parent but with a retina screen, anchors.left and anchors.right are half the width (and height) I want (half because for retina screen: devicePixelRatio = 2).
    Something like :
    anchors.left: parent.left*screen.devicePixelRatio will be perfect but of course this is,impossible with a QQuickAnchorLine...

    If you have any idea to help me to fix this, thanks for your help.

    PS: I prefer to avoid using the relative properties x and y of each item which would make my code very complex (because of the size of the software and the QML hierarchy)

    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