Quote Originally Posted by jpn View Post
Store toolbar_but as a member variable. The toolbar_but in addButton() is different than in addToolBar(). It's just a dangling pointer in addButton().
I understand you. But how can I realise it? Toolbutton belongs to mainwindow and I call him in a dock window.