Feature #8295
openImprove handling of WStringListModel methods insertString and addString
0%
Description
These methods of WStringListModel currently return void:
void insertString (int row, const WString &string)
void addString (const WString &string)
and it is cumbersome to perform subsequent actions on newly added items that need a WModelIndex as parameter, such as setData(const WModelIndex &index, const cpp17::any &value, ItemDataRole role=ItemDataRole::Edit)
.
Please consider modifying these methods so that a WModelIndex of the newly added item is returned so that subsequent actions can directly work on this.
WModelIndex& insertString (int row, const WString &string)
WModelIndex& addString (const WString &string)
(or alternatively provide a method to easily obtain the WModelIndex of a string value in the model)
Thanks a lot!
Stefan
No data to display