deepak deepak - 1 year ago 151
C++ Question

setData() versus insertRows() Qt ModelView

In Qt model-view how is

different than
. I understand that
is just for new rows addition, whereas
can modify existing data as well. Can
also be used to insert additional rows in a table or list based model. I am new to Qt, so please pardon if the question is too basic.

Answer Source

No, setData() is to be used to change existing data, or more precisely to manipulate data for an index that exists. You cannot add rows using this method.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download