Dear All
I have list of QTextEdit, I am creating the edit box and then trying to delete but its not deleting. Can u anyone tell me what I am doing wrong.
QList<QTextEdit *> list;
int w = 100;
int h= 25;
int incre=0;
for(i=0; i<2; i++)
{
list.at(i)->setGeometry(0,0+incre,w,h);
list.at(i)->show();
incre = incre+h+10;
}
int cnt = list.count();
for(int i=0; i<cnt; i++)
delete list.at(i);
list.clear();
QList<QTextEdit *> list;
int w = 100;
int h= 25;
int incre=0;
for(i=0; i<2; i++)
{
list.append(new QTextEdit(this));
list.at(i)->setGeometry(0,0+incre,w,h);
list.at(i)->show();
incre = incre+h+10;
}
int cnt = list.count();
for(int i=0; i<cnt; i++)
delete list.at(i);
list.clear();
To copy to clipboard, switch view to plain text mode
But even after deleting the edit boxes I can still see them, means they’re not being deleted. Whats wrong , any help would be appreciated.
Bookmarks