qDebug()<<"%%%%%%%%%%%%%%%%%%%"<<" "<mainLayout->count();
    while(mainLayout->count())
     {
        QWidget *p=this->mainLayout->itemAt(0)->widget();
        p->setParent (NULL);
        this->mainLayout->removeWidget(p);
        delete p;
     }
    qDebug()<<"################"<<" "<mainLayout->count();