Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Designer regression in Qt 4.8.5 ???
Today I noticed a strange behavior in Qt Designer (version 4.8.5). When I load an existing form containing a Grid layout and insert another label, the window - all of a sudden - becomes much wider. This happens as soon as I resize the window - either vertically or horizontally - after inserting the label. It's enough if I resize the window by a single pixel to trigger this effect. And there is absolutely no way to make it smaller again! Had to revert to an older backup copy!
After new label was inserted:
Note that my window became much wider and can not be made smaller again!
Tried with Designer from Qt 4.8.4 and there was no such behavior at all. After the label has been inserted, the window can still be resized freely. Does not become much wider suddenly at all. And can be resized back to its original size just fine. Even more strange: If I modify the .UI file in Designer 4.8.4 and then open it in 4.8.5, there is no problem either. Only inserting the label in Designer 4.8.5 causes the trouble. Any ideas? Is this a regression?
If you want to try yourself, the original .UI file is here:
Not really. I'm observing this since you have posted it the first time, but I can't say for sure that I've seen this happen. There are some cases where the layouts get too big without any apparent reason, but I can't reliably pinpoint the source of the problem.
And here, it seems you add too many spacers! It is enough to put all checkboxes in a vertical layout and it will stretch automatically. You only need one spacer as the last item in the layout if you want to pack the lines together.
I have added fixed size spacers between the checkboxes, because I want a fixed distance between those. Surely, one can discuss whether this is the "perfect" design. But after all it comes down to personal preferences.
Anyway, I don't think my design is "illegal". At least I have never seen any note like "Qt supports up to N spacers in a layout. If you add more, crazy unpredictable things are going to happen!". So if it's not illegal, then it is supposed to work correctly. And if it is illegal, there should be an error message rather than undefined behavior. Otherwise I'd call this a bug...
- It works perfectly fine until I add another "row"
- I don't think what happens makes any sense, or do I miss something?
- There is no such issue in Qt 4.8.4, but in Qt 4.8.5 - regression?
Right, I did not know those are fixed spacers and I just wanted to tell you that in case you were unaware. I think your solution is perfectly legal :)
This might indeed be a regression, you can check Jira if it was reported and open an issue there. Please post the url here, I'd like to see the progress on this. But, to be honest, this seems so minor that it might not get fixed by anybody, you are best off trying to fix that yourself, probably... on the other hand, I am slowly starting work on some Qt bugs, so maybe I will take a look here, too.
So much about that:
[quote]Things like this may happen when minimum sizes of controls grow with changes in Qt over time in forms that have not been touched for a while.
Seems like there is no interest to investigate the bug. So I'm locked to Qt Designer v4.8.4 with my project then, what a pity :-/