QVBoxLayout and QCheckBox
-
@else if(ZERO == qstrncmp(ExitFromNet.toHex().data(), NewDatagram.left(FOUR).data(), ExitFromNet.size()) )
{
if (MainWin::IpHostTbl.contains(SndrIp) )
{ THash::iterator iter = IpHostTbl.find(SndrIp);
MainWin::IpHostTbl.erase(iter);
QCheckBox* ForRemove = this->LstUser->VBoxLt->findChild<QCheckBox*>(QString(NewDatagram.remove(ZERO, FOUR)) );
this->LstUser->VBoxLt->removeWidget(ForRemove);
delete ForRemove;
this->LstUser->VBoxLt->update();
}
}
@Why not delete ForRemove from VBoxLt ? children->count() = 0 ? But in VBoxLt is have QCheckBox* - in screen OS(win7) is show. How I can delete?
-
checkBox is not a child of VBox. Probably your program should be crashing. You should use index method of layout to get the pointer to checkbox and remove it.