@@ -626,9 +626,9 @@ class NavigationToolbar2QT(NavigationToolbar2, QtWidgets.QToolBar):
626
626
def __init__ (self , canvas , parent , coordinates = True ):
627
627
"""coordinates: should we show the coordinates on the right?"""
628
628
QtWidgets .QToolBar .__init__ (self , parent )
629
- self .setAllowedAreas (
630
- _enum ("QtCore.Qt.ToolBarArea" ).TopToolBarArea
631
- | _enum ("QtCore.Qt.ToolBarArea" ).TopToolBarArea )
629
+ self .setAllowedAreas (QtCore . Qt . ToolBarArea (
630
+ _to_int ( _enum ("QtCore.Qt.ToolBarArea" ).TopToolBarArea ) |
631
+ _to_int ( _enum ("QtCore.Qt.ToolBarArea" ).BottomToolBarArea )) )
632
632
633
633
self .coordinates = coordinates
634
634
self ._actions = {} # mapping of toolitem method names to QActions.
@@ -651,9 +651,9 @@ def __init__(self, canvas, parent, coordinates=True):
651
651
# will resize this label instead of the buttons.
652
652
if self .coordinates :
653
653
self .locLabel = QtWidgets .QLabel ("" , self )
654
- self .locLabel .setAlignment (
655
- _enum ("QtCore.Qt.AlignmentFlag" ).AlignRight
656
- | _enum ("QtCore.Qt.AlignmentFlag" ).AlignVCenter )
654
+ self .locLabel .setAlignment (QtCore . Qt . AlignmentFlag (
655
+ _to_int ( _enum ("QtCore.Qt.AlignmentFlag" ).AlignRight ) |
656
+ _to_int ( _enum ("QtCore.Qt.AlignmentFlag" ).AlignVCenter )) )
657
657
self .locLabel .setSizePolicy (QtWidgets .QSizePolicy (
658
658
_enum ("QtWidgets.QSizePolicy.Policy" ).Expanding ,
659
659
_enum ("QtWidgets.QSizePolicy.Policy" ).Ignored ,
@@ -883,13 +883,13 @@ class ToolbarQt(ToolContainerBase, QtWidgets.QToolBar):
883
883
def __init__ (self , toolmanager , parent ):
884
884
ToolContainerBase .__init__ (self , toolmanager )
885
885
QtWidgets .QToolBar .__init__ (self , parent )
886
- self .setAllowedAreas (
887
- _enum ("QtCore.Qt.ToolBarArea" ).TopToolBarArea
888
- | _enum ("QtCore.Qt.ToolBarArea" ).TopToolBarArea )
886
+ self .setAllowedAreas (QtCore . Qt . ToolBarArea (
887
+ _to_int ( _enum ("QtCore.Qt.ToolBarArea" ).TopToolBarArea ) |
888
+ _to_int ( _enum ("QtCore.Qt.ToolBarArea" ).BottomToolBarArea )) )
889
889
message_label = QtWidgets .QLabel ("" )
890
- message_label .setAlignment (
891
- _enum ("QtCore.Qt.AlignmentFlag" ).AlignRight
892
- | _enum ("QtCore.Qt.AlignmentFlag" ).AlignVCenter )
890
+ message_label .setAlignment (QtCore . Qt . AlignmentFlag (
891
+ _to_int ( _enum ("QtCore.Qt.AlignmentFlag" ).AlignRight ) |
892
+ _to_int ( _enum ("QtCore.Qt.AlignmentFlag" ).AlignVCenter )) )
893
893
message_label .setSizePolicy (QtWidgets .QSizePolicy (
894
894
_enum ("QtWidgets.QSizePolicy.Policy" ).Expanding ,
895
895
_enum ("QtWidgets.QSizePolicy.Policy" ).Ignored ,
0 commit comments