Hide or crop overlapping text in QLabel?
问题 I'm currently building a UI where I do have 3 labels that are arranged in a horizontal layout: | textLabel | valueLabel | unitLabel | The valueLabel and unitLabel are aligned right. unitLabel has a fixed width, valueLabel 's width is variable and depends on the text length inside it. textLabel is aligned left and fills the remaining horizontal space right up to the valueLabel . So, in other words, the textLabel 's width is not fixed but depends on the width of valueLabel . My problem: when