Details
-
Bug
-
Resolution: Invalid
-
Not Evaluated
-
None
-
Qt Creator 4.7.0
-
None
-
OS: Windows10
Qt Compiler: Qt 5.11.1 MinGW 32bit
Qt Creator: 4.7.0
Description
Problem
When creating a Qt Widgets Application by Qt Creator, I created a new action with some shortcut by embedded Qt Designer, and didn't add it to toolbar or menubar.
I wished to trigger it by shortcut.
But I failed to trigger it by shortcut.
I check the builded `ui_*.h` and find it not be added (there is no function `addAction`) to the widget at all.
I can add it manually in my code. But in my opinion, Qt Designer should add it automatically, not doing that is an unexpected behavior.
Briefly, Qt Designer doesn't add action to the widget automatically.
MWE Reproduce
- Create a new Qt Widgets Application by Qt Creator.
- Edit the `*.ui` file by embedded Qt Designer
- add an action with some shortcut by Action Editor
- connect the signal `triggered` of the action to the slot `close` of the main widget by Signal Slots Editor.
- Build and run. Try the shortcut and find it not work.
- Check `ui_*.h` and find the action isn't added.
Attachment
I attach a mwe reproduced by the steps above.