title: destroy QHBoxLayout
body: <p>hello ever one here is my code i am calling all these statements in my button event handler like this</p>
  
  <pre><code>void analysis::on_pushButton_clicked()
  {
   myplot * p = new myplot(gao.structpayloadgraph,gao1.structpayloadgraph, gao.structcol-2, "payload");
  
      myplot * p1 = new myplot(gao.structsessiongraph,gao.structsessiongraph ,gao.structcol-2, "session");
  
  
    QHBoxLayout * layout = new QHBoxLayout;
   ui-&gt;horizontalLayout_2-&gt;addLayout(layout);
   layout-&gt;addWidget(p);
   layout-&gt;addWidget(p1);
  
  }
  </code></pre>
  
  <p>myplot is graph plotting class
  but the problem is that each time i click the button new graph appear and previous remains, like one !st click 2 appear on second they become 4 then 6......
  how to i destroy QHBoxLayout in my button event handler</p>
  
  <p>thanks </p>