Random changes in height value.
-
One of my classes randomly changes height value when I save. I want it to be 800480, but when I save and re-enter its 800500+ (It can be 518, 544, 600, it really varies in a way that seems random). Now it happened to another class. Why does this happen?
I don't want to fix its size because the app it's meant to be resizable in different displays. -
@ChrisW67 I just seen your reply. The bug, I think, still persist. For the time being, I fixed its size and was planning to address it when I finish the whole project.
The thing is, I save with cmd+s, build and run the code. When I re-enter the .ui of my class, I can see that its size changed. This affects the window's size of the hole app.
Thank you for your response. -
@superg said in Random changes in height value.:
The thing is, I save with cmd+s, build and run the code. When I re-enter the .ui of my class, I can see that its size changed.
We don 't know what you mean here. It is not possible that running your code could change what is in the
.ui
file. You can inspect what is in that file with a text editor, and you can even look at theui_....h
file which is generated from it located in your build output direcrtory. -
@JonB It is difficult to explain. I'll try to do it step by step.
First, to give some context, I'll clarify that this happens to a class called "Menu".
The size of this Menu is 800x480 (Thats the values that I set and that you can see in the .ui file, below "Geometry"). Inside, there are layouts with buttons for different functions that this menu has to provide, spacers and a few labels. The menu has a vertical layout.
Now, I'll explain the bug.- I run the app. When the program window appears, you can see that the height has changed, it bigger.
- I re-enter the Menu.ui file, and I see the Height value has changed to 500,600, or a value like that.
- I try to change it, but when I put the value 480 in Height, It changes to a value bigger. For example 540. I have to break the Manu layout to adjust it again to 480.
- I break the menu layout and adjust its height again.
- back to step one.
It's very weird. For now, I just fixed the menu's size. The app is, for now, meant for a unique display, so I can fix it's size to that displays resolution.
-
When you can't set a lower value then your widgets inside the layout don't allow this (e.g. because their minimum size is to high so they don't fit into the layout)
-
@Christian-Ehrlicher Thanks, I didn't think of that. I'll check later if it does the trick!