Pergunta

I have some QLabels in a QWindow. They might have some space in common. I want to know how can I change label's depth. In default situation the label which defined later is on the previews ones.

Foi útil?

Solução

You can define an indent for each widget and call raise_ function in sort of their indent.

for label in labels:
    label.raise_()

Outras dicas

you should use raise, like : labelname.raise_()

All widgets have methods for this.

widget.stackUnder(another_widget) #relative postition

widget.lower() # send to the bottom
widget.raise_() # send to the top

See documentation on QWidget

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top