سؤال

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.

هل كانت مفيدة؟

المحلول

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

for label in labels:
    label.raise_()

نصائح أخرى

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

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top