Reputation: 105
I want let the two code work simultaneously,but I don't know how to do that.
self.botV.setAlignment(Qt.Aligntop)
self.botV.setAlignment(Qt.AlignCenter)
It just do the last one.
Upvotes: 3
Views: 5990
Reputation: 243897
I suppose you want a central horizontal alignment and the vertical alignment in the top, then you must use the operator |
, also be careful with the case of the variables, Qt uses camelcase:
self.botV.setAlignment(Qt.AlignHCenter | Qt.AlignTop)
Upvotes: 5