@@ -626,9 +626,9 @@ class NavigationToolbar2QT(NavigationToolbar2, QtWidgets.QToolBar):
626626 def __init__ (self , canvas , parent , coordinates = True ):
627627 """coordinates: should we show the coordinates on the right?"""
628628 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 )) )
632632
633633 self .coordinates = coordinates
634634 self ._actions = {} # mapping of toolitem method names to QActions.
@@ -651,9 +651,9 @@ def __init__(self, canvas, parent, coordinates=True):
651651 # will resize this label instead of the buttons.
652652 if self .coordinates :
653653 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 )) )
657657 self .locLabel .setSizePolicy (QtWidgets .QSizePolicy (
658658 _enum ("QtWidgets.QSizePolicy.Policy" ).Expanding ,
659659 _enum ("QtWidgets.QSizePolicy.Policy" ).Ignored ,
@@ -883,13 +883,13 @@ class ToolbarQt(ToolContainerBase, QtWidgets.QToolBar):
883883 def __init__ (self , toolmanager , parent ):
884884 ToolContainerBase .__init__ (self , toolmanager )
885885 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 )) )
889889 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 )) )
893893 message_label .setSizePolicy (QtWidgets .QSizePolicy (
894894 _enum ("QtWidgets.QSizePolicy.Policy" ).Expanding ,
895895 _enum ("QtWidgets.QSizePolicy.Policy" ).Ignored ,
0 commit comments