change a lot of data that are seen with model view QStandardItemModel
Hello people i'm brazilian, so not notice in my English.
I'm newbie in QT, but a little experienced in programming with c/c++
I'm modeling streets with graphs, and each street have a value(cost).
I'm working with basedata to store data's street and displayed the graph(street map) with openGL.
The user can change the cost, but righ now only one at a time. I want that the User can select more than one street (which will have the same cost) and change the value, and the value change in all selected streets. I dont know how to do it.
Please help me.
Re: change a lot of data that are seen with model view QStandardItemModel
Set the selection mode in your view to multi select and provide an action that opens a dialog where the user can enter the new value. Then iterate over all selected entries and use QAbstractItemModel::setData() or QStandardItem::setData() to update each of the entries.
Re: change a lot of data that are seen with model view QStandardItemModel
ThankYou wysota, I'll try. I dont know very much the qt model/view but i'll try it.