QAction shortcut icon on qtoolbar disappeared after closing dialog box

I added QAction to QToolBar as a shortcut with an icon, when the icon is clicked (QAction emitts signal triggered ()), a dialog box will appear. It is strange when I close this dialog that the icon on QToolBar and QAction in Qmenu disappeared. Has anyone encountered such a situation? Before clicking the first icon

After closing the QDialog triggered by the action of the first icon

Finally, I find why. I delete the non-NULL pointer in the dialog!

+3
source share

All Articles