See QDataWidgetMapper, which is the "right" way to do what you want.
And no wonder that setCurrentIndes is not working. Debug what QModel->data(items[6],Qt:isplayRole) returns! It is "quan 2" which is not a number....
See QDataWidgetMapper, which is the "right" way to do what you want.
And no wonder that setCurrentIndes is not working. Debug what QModel->data(items[6],Qt:isplayRole) returns! It is "quan 2" which is not a number....
hohoanganh205 (26th December 2011)
Bookmarks