@@ -630,9 +630,9 @@ class NavigationToolbar2QT(NavigationToolbar2, QtWidgets.QToolBar):
630630 def __init__ (self , canvas , parent , coordinates = True ):
631631 """coordinates: should we show the coordinates on the right?"""
632632 QtWidgets .QToolBar .__init__ (self , parent )
633- self .setAllowedAreas (
634- _enum ("QtCore.Qt.ToolBarArea" ).TopToolBarArea
635- | _enum ("QtCore.Qt.ToolBarArea" ).TopToolBarArea )
633+ self .setAllowedAreas (QtCore . Qt . ToolBarArea (
634+ _to_int ( _enum ("QtCore.Qt.ToolBarArea" ).TopToolBarArea ) |
635+ _to_int ( _enum ("QtCore.Qt.ToolBarArea" ).BottomToolBarArea )) )
636636
637637 self .coordinates = coordinates
638638 self ._actions = {} # mapping of toolitem method names to QActions.
@@ -655,9 +655,9 @@ def __init__(self, canvas, parent, coordinates=True):
655655 # will resize this label instead of the buttons.
656656 if self .coordinates :
657657 self .locLabel = QtWidgets .QLabel ("" , self )
658- self .locLabel .setAlignment (
659- _enum ("QtCore.Qt.AlignmentFlag" ).AlignRight
660- | _enum ("QtCore.Qt.AlignmentFlag" ).AlignVCenter )
658+ self .locLabel .setAlignment (QtCore . Qt . AlignmentFlag (
659+ _to_int ( _enum ("QtCore.Qt.AlignmentFlag" ).AlignRight ) |
660+ _to_int ( _enum ("QtCore.Qt.AlignmentFlag" ).AlignVCenter )) )
661661 self .locLabel .setSizePolicy (QtWidgets .QSizePolicy (
662662 _enum ("QtWidgets.QSizePolicy.Policy" ).Expanding ,
663663 _enum ("QtWidgets.QSizePolicy.Policy" ).Ignored ,
@@ -887,13 +887,13 @@ class ToolbarQt(ToolContainerBase, QtWidgets.QToolBar):
887887 def __init__ (self , toolmanager , parent ):
888888 ToolContainerBase .__init__ (self , toolmanager )
889889 QtWidgets .QToolBar .__init__ (self , parent )
890- self .setAllowedAreas (
891- _enum ("QtCore.Qt.ToolBarArea" ).TopToolBarArea
892- | _enum ("QtCore.Qt.ToolBarArea" ).TopToolBarArea )
890+ self .setAllowedAreas (QtCore . Qt . ToolBarArea (
891+ _to_int ( _enum ("QtCore.Qt.ToolBarArea" ).TopToolBarArea ) |
892+ _to_int ( _enum ("QtCore.Qt.ToolBarArea" ).BottomToolBarArea )) )
893893 message_label = QtWidgets .QLabel ("" )
894- message_label .setAlignment (
895- _enum ("QtCore.Qt.AlignmentFlag" ).AlignRight
896- | _enum ("QtCore.Qt.AlignmentFlag" ).AlignVCenter )
894+ message_label .setAlignment (QtCore . Qt . AlignmentFlag (
895+ _to_int ( _enum ("QtCore.Qt.AlignmentFlag" ).AlignRight ) |
896+ _to_int ( _enum ("QtCore.Qt.AlignmentFlag" ).AlignVCenter )) )
897897 message_label .setSizePolicy (QtWidgets .QSizePolicy (
898898 _enum ("QtWidgets.QSizePolicy.Policy" ).Expanding ,
899899 _enum ("QtWidgets.QSizePolicy.Policy" ).Ignored ,
0 commit comments