On Mac, adding a QWidgetAction to the main menu during the processing of an aboutToShow() signal, cause the widget to not show up properly when using the native menu bar. The rendering is correct the second time the menu is shown.
Attached is a project to test the issue. It is present in Qt 5.13.
A patch which solves the problem is proposed here:
The two screenshots show the result before and after the patch is applied. The problem does not affect the menu bar if the native option is turned off.