If you place widgets on a toolbar then you should be manipulating them through QWidgetAction and not directly.