Open vvim opened 8 years ago
in OphaalpuntenWidget::OphaalpuntHasAanmeldingPresent(int ophaalpunt_id)
OphaalpuntenWidget::OphaalpuntHasAanmeldingPresent(int ophaalpunt_id)
is the for-loop the correct way to iterate through listOfLocationsModel? Better ask at StackExchange, maybe an Iterator is better? But can't find any for StandardItemModel?
for(i = 0; i < listOfLocationsModel->rowCount(); i++) { if(listOfLocationsModel->data(listOfLocationsModel->index(i, OPHAALPUNTQTREEVIEW_OPHAALPUNT_ID)).toInt() == ophaalpunt_id) { row = i; break; } }
There is an entry at StackOverflow: https://stackoverflow.com/questions/33124903/how-to-iterate-through-a-qstandarditemmodel-completely
@NelDav thank you for the link !
in
OphaalpuntenWidget::OphaalpuntHasAanmeldingPresent(int ophaalpunt_id)
is the for-loop the correct way to iterate through listOfLocationsModel? Better ask at StackExchange, maybe an Iterator is better? But can't find any for StandardItemModel?