@@ -630,9 +630,9 @@ class NavigationToolbar2QT(NavigationToolbar2, QtWidgets.QToolBar):
630
630
def __init__ (self , canvas , parent , coordinates = True ):
631
631
"""coordinates: should we show the coordinates on the right?"""
632
632
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 )) )
636
636
637
637
self .coordinates = coordinates
638
638
self ._actions = {} # mapping of toolitem method names to QActions.
@@ -655,9 +655,9 @@ def __init__(self, canvas, parent, coordinates=True):
655
655
# will resize this label instead of the buttons.
656
656
if self .coordinates :
657
657
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 )) )
661
661
self .locLabel .setSizePolicy (QtWidgets .QSizePolicy (
662
662
_enum ("QtWidgets.QSizePolicy.Policy" ).Expanding ,
663
663
_enum ("QtWidgets.QSizePolicy.Policy" ).Ignored ,
@@ -887,13 +887,13 @@ class ToolbarQt(ToolContainerBase, QtWidgets.QToolBar):
887
887
def __init__ (self , toolmanager , parent ):
888
888
ToolContainerBase .__init__ (self , toolmanager )
889
889
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 )) )
893
893
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 )) )
897
897
message_label .setSizePolicy (QtWidgets .QSizePolicy (
898
898
_enum ("QtWidgets.QSizePolicy.Policy" ).Expanding ,
899
899
_enum ("QtWidgets.QSizePolicy.Policy" ).Ignored ,
0 commit comments