All objects are getting resized depends on screen resolution
-
Hey guys, I plugged my Laptop to a monitor as a second screen.
Whenever I move the Running App window (which was made with python), some objects get smaller, fonts getting smaller, and many objects move left or right (won't be aligned anymore)Is there any way I can "Lock" all the objects properties, so that they don't change?
-
@georgehanna1993 said in All objects are getting resized depends on screen resolution:
and many objects move left or right
For this part, are you using Qt layouts in your UI?
Is there any way I can "Lock" all the objects properties, so that they don't change?
Do you truly mean this? So if the screen resolution changes to, say, more pixels, you want your application to only fill the top-left of the new resolution screen?
-
let me show you an example:
First screen:
image url)
Second Screen:
Just look at the marked line there...something is moving.
-
This post is deleted!
-
@JonB I just checked, even with layout, When I preview the page in QT designer, and move the window from one screen to another, It changes.
Even the QWidgetTable, also changes size and hide some elements in it.is there any solution for that?
-
@georgehanna1993
I will keep this brief, as I am not the person to answer (I don't use varying screens, or if I do I'm happy with however it comes out).I imagine in your shots, for example, that there are differences between the label sizes/positions versus the text edit/font as the resolution changes. Part of the point of layouts is to allow these all to be resized in a suitable fashion, bot to keep things in exactly the same place/size.
In the case you show, If I wanted/expected the right-hand sides of the labels and the text edit to line up, I would expect to use some kind of layouts (might even be a grid one, or tables [but not for the situation you show]) where I specified my desired alignments.
That's all I know, maybe someone else has better advice.