Windows dimension
-
Hi, I know that this is a stupid question, but I would hear an opinion from some experts.
I wrote a little program in my Desktop PC with display 23" and resolution 1920x1080.
The program have fixed size windows and in my monitor are perfect.
I ran the program in a Microsoft Surface with display 12" and resolution 1920x1080 and the windows are really small and the content is partially hidden.
To draw them, I used layouts.
Now, I'm a bit confused on which one it is the correct way to create graphics interfaces properly and have portability in various display configuration.
Are there guidelines for this?
Do you have links to documentation about this?
Thanks for help. -
Hi,
for starters, obviously, HD resolution on 23" screen will have larger pixels than on 12". On top of that there is scaling present in Windows, which allows one to scale the content - so you get bigger size of text, icons, etc. I'd suggest to start reading here: https://doc.qt.io/qt-5/highdpi.htmlIn short, having fixed size anything in the UI, when one doesn't know both the target resolution (width, height, dpi) nor the scaling is not best practice. Having locked proportions of the UI elements, so they scale properly - that's something else.