I faced Same problem, actual problem in currentRowChanged() signal's slot
I have taken one slot for currentRowChanged() signal of listwidget there i am trying to access element like following code, if we clear the list that time also that slot will be get called,so memory crash occurs,
My old code,
connect(myistWidget,SIGNAL(currentRowChanged(int)) ,this,SLOT(changeLabel(int)));
void QZugNummerDlgAction::changeLabel(int position)
{
QString labelText = myistWidget.at(position);//if we clear list memory crash occurs heremyLabel->setText(labelText);
}
New Code, i put the following condition it works properly,
void QZugNummerDlgAction::changeLabel(int position)
{
if(myistWidget->currentRow()!=-1)
{QString labelText = myistWidget.at(position);
myLabel->setText(labelText);
}
}
Thanks,
Rajesh.S
Bookmarks