Hey guys, I got tired of designing GUI on DirectGUI and tried to move to GitHub - ParisNeo/QPanda3D: Panda3D wrapper for PyQt5.
But it only supports mouse wheel events. Is there any alternatives to embed Panda into PyQT5?
This doesn’t work:
def mousePressEvent(self, evt):
button = evt.button()
try:
b = "{}{}".format(get_panda_key_modifiers_prefix(evt), QPanda3D_Button_translation[button])
if self.debug:
print(b)
messenger.send(b)
except:
print("Unimplemented button. Please send an issue on github to fix this problem")
This works and zoom in and out my scene:
def wheelEvent(self, evt):
delta = evt.angleDelta().y()
if delta > 0:
if self.debug:
print("wheel_up")
messenger.send('wheel_up')
elif delta < 0:
if self.debug:
print("wheel_down")
messenger.send('wheel_down')
This is my repository: main.py works, main_qt.py doesn’t.