I am fairly new to Qt, and have found a strange oddity in the way spacer's work in Qt Designer.
I have three labels, with a spacer in between each, like this
label1 <--spacer--> labe2 <--spacer--> label3
I then layout these 5 widgets horizonatally, and then layout the mainwindow as a grid.
What I expect to get is label1 on the left, label3 on the right, and label2 centered. Instead label2 is not centered? It seems to depend on the sizes of labels 1 and 3. If I force the labels to be the same pixel width, it works. But with different sizes, it doesn't.
Here is how it looks in Qt Designer
Here is how the application looks when run
The actual center point of the label is the "D" in "CENTERED".
The black arrow shows the actual center point of the window, which does not line up with the center point of the label.
Has anyone else seen this? Obviously I can just size the side labels the same and it works, but should I have to do this? Isn't this what spacers are for?
Thanks,
Keith