Popup menu hourglass (spining circle) while selecting

Hi, I’ve created a popup menu in python based on one of the examples (FBMenu.py) in mobu SDK.

while I’m selecting in this popup menu, mobu it shows a a Hourglass or a Spinning circle cursor, like if mobu is processing something, but it’s only visual because you can still select the menu objects, and all that.
any ideia how to solve this?
maybe:
QtWidgets.QApplication.setOverrideCursor(QtGui.QCursor(QtCore.Qt.ArrowCursor))
this breaks mobu tho :laughing:

here is my code:

from pyfbsdk import *
from PySide2 import *
from IKeffectorsSwitch_class import *

def eventMenu(control, event):    
    if event.Id == 1:
        ikswitch = IKSwitcher()
        ikswitch.IKSwitchON()
    if event.Id == 2:
        ikswitch = IKSwitcher()
        ikswitch.IKSwitchOFF()
    

lSubMenu = FBGenericMenu()
lSubMenu.InsertFirst("IK Switch OFF", 2)
lSubMenu.InsertFirst("IK Switch ON", 1)
lSubMenu.OnMenuActivate.Add(eventMenu)


mouse_pos = QtGui.QCursor.pos()
pos_x = mouse_pos.x()
pos_y = mouse_pos.y()

lItem = lSubMenu.Execute(pos_x, pos_y)

This will fix it.
QtWidgets.QApplication.restoreOverrideCursor()

Then you can start customizing your widgets with the cursor you want.
ExampleButton.setCursor(QtGui.QCursor(QtCore.Qt.PointingHandCursor))

1 Like