QtWidgets.QScrollBar action is int not SliderAction enum
Barry Scott
barry at barrys-emacs.org
Tue Jul 5 10:54:12 BST 2022
I have code like this:
class BemacsVerticalScrollBar(QtWidgets.QScrollBar, be_debug.EmacsDebugMixin):
def __init__( self, panel ):
super().__init__( QtCore.Qt.Orientation.Vertical, panel )
self.actionTriggered.connect( self.handleActionTriggered )
def handleActionTriggered( self, action ):
# action is an int - convert to its enum
action = self.SliderAction( action )
# now can compare to the enum values
if action == self.SliderAction.SliderSingleStepAdd:
The action param is an int and not one of the enum values from SliderAction.
Is this intended?
Barry
More information about the PyQt
mailing list