PyQT5 Widget Alternatives

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.

To get mouse wheel events, do the following:

base.accept('mouse2', wheelEvent)

And to get mouse events, use:

base.accept('mouse1', mousePressEventLeft) # Left Mouse
# and
base.accept('mouse3', mousePressEventRight) # Right Mouse