Hi all

I have a dumb question, but this doing my head in (as layouts generally do). I'm pretty sure the solution is straight forward, I'm just not seeing it.

Anyway, I have a dialog with three horizontal sliders (they are actually custom sliders, but I don't think it is relevant). Each slider is for picking a color value from 0-255 (for red, green and blue respectively). To the right of each slider I have a label to display its value. The sliders have a horizontal size policy of expanding so that when the dialog is resized horizontally so are the sliders. The problem is when the value in a label changes between 1, 2 and 3 characters in length it affects the length of the slider. I wish the sliders to remain unchanged in length when the label value changes.

I was thinking that I need a minimum size for the label that can hold three characters, but I don't think this will take into consideration variations in font size?

The sliders also each have a label to their left, R, G and B, respectively. I currently have the labels and the sliders in a grid layout.

Thanks for reading.