M_pGraphicsWidget=new GcImageWidget (this);
M_pToolBox=new GcImageWidgetToolBox (m_pGraphicsWidget, this);
////
M_mainlayout=new QGridLayout ();
M_mainlayout - & gt; AddWidget (m_pToolBox, 0, 0);
M_mainlayout - & gt; AddWidget (m_pGraphicsWidget, 0, 1);
SetLayout (m_mainlayout);
By setting up the layout, let the toolbar and view window can be created out
Then I created a dialog box to call the library, and create the object when structure (test the Demo I did not write here shows what)
m_ImageView=new GcGraphicsWindow (this);
Then I close the dialog box will collapse ~ ~ ~ ~ ~ and then debugging found has been the destructor collapse when the object ~ ~
CodePudding user response:
I put the rolls all NEW blocked inside structure, the construction of an empty, empty destructor, that is, when the external NEW just create a window, or collapse, it seems has nothing to do with the window class and toolbar belowCodePudding user response:
Feel is static library is a problem with the link you call? Call the library to return the object's memory is being invoked the DLL in opening up the main process of release resources will have a problemCodePudding user response: