Issue
I am trying to align an item both horizontally on the right and vertically in the center. There are 2 single functions that work:
setAlignment(Qt.AlignRight)
and
setAlignment(Qt.AlignVCenter)
But when the 2 functions are combined (one after the other), the result is that only the last one is applied (and the first one is forgotten).
How to get the alignment I want (horizontal right and vertical center)?
Solution
setAlignment
accepts alignment flag or flags combination, you can build flag combination with bitwise or
operator
setAlignment(Qt.AlignVCenter | Qt.AlignRight)
Answered By - mugiseyebrows
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.