QWidget::insertAction: Attempt to insert null action?
-
My project has a lot of
QAction
, I had declared them in the header and in the source, I gave them default tonullptr
and instantiated them all at once with a loop. After that I assigned them to the different menus. However at the end, I have missed a couple of QActions somewhere and Qt Creator is giving me a warningQWidget::insertAction: Attempt to insert null action?
How do I find out which one are they?
-
If it is a warning, you can set environment variable
QT_FATAL_WARNINGS
and app will crash whenever that message is printed. Then it should be trivial to check which action it is using an attached debugger. -
If it is a warning, you can set environment variable
QT_FATAL_WARNINGS
and app will crash whenever that message is printed. Then it should be trivial to check which action it is using an attached debugger.