Skip to content
  • 0 Votes
    4 Posts
    511 Views
    JKSHJ

    @Dexter99 said in Pyqt5 help on button and grid layouts.:

    The show is okay but now I want to add it in a grid layout.

    Please show us what you've tried.

  • 0 Votes
    4 Posts
    1k Views
    R

    @johngod Thank you so much, you're right Screen.pixelDensity would be the complete solution if it was in qml,
    sifting trough the qt source i was able that it was derived from:

    double pixelpermm = QGuiApplication::primaryScreen()->physicalDotsPerInch() / 25.4 //physicalDotsPerInchX() & physicalDotsPerInchY() also exist

    and it seems to be correct on both my iPhone & iPad quite wel (better than all other ways I found so far)

    @Lorenz thanks, but for the time being I want to stick to Qt as it is a paid sdk as soon as you go commercial