Hello! I noticed that when I add actions after the MainWindow is instantiated, the keybindings do seem to be added. Is this the expected behavior? If so, is there something I am supposed to do after to add the keybindings? If not, would it be possible for this to be added?
- app_model version: 0.3.1
- Backend: Qt
- OS: Mac OS
Thanks!
To reproduce:
- Run the
model_app.py demo script. The key bindings should work.
- Move the for loop for registering the actions to after the window instantiation. The app still launches and the actions are visible in the menu and work when pressed. However, the keybindings no longer work.
if __name__ == "__main__":
app = Application(name="my_app")
qapp = QApplication.instance() or QApplication([])
qapp.setAttribute(Qt.ApplicationAttribute.AA_DontShowIconsInMenus)
main_win = MainWindow(app=app)
# adding actions now after the main window created
for action in ACTIONS:
app.register_action(action)
app.injection_store.register_provider(lambda: main_win, MainWindow)
main_win.show()
qapp.exec_()
Hello! I noticed that when I add actions after the MainWindow is instantiated, the keybindings do seem to be added. Is this the expected behavior? If so, is there something I am supposed to do after to add the keybindings? If not, would it be possible for this to be added?
Thanks!
To reproduce:
model_app.pydemo script. The key bindings should work.