Hi again, I'm faced with the second application's crash.
Here is my code:
where p1FamilyComboBox is a instance of , and dishes is an instance of the following class Record.Code:
void DishManager::initPage1() { ui.p1FamilyComboBox->addItems(dishes->getFamilies()); }
I think maybe it's due to theCode:
{ QStringList names; for(int i = 0; i < dishes.size(); i++) { if(dishes[i].getFamily() == family) { names << dishes[i].getName(); //如果某菜谱属于此菜系,则加入其菜名 } } return names; }
Is there anything wrong with the returning value.Code:
const QStringList& Record::getDishNamesByFamily
Thanks in advance!!
