Re: [Interest] Add row to model *with data*?

2019-08-16 Thread Matthew Woehlke
On 16/08/2019 09.27, Jérôme Godbout wrote: > Maybe you can add a type to your model and make a map of type to > Component, when initalizing the view element, use a Loader that will > create the proper Item view based on your type. Not sure this is > what you are looking for. I honestly didn't fo

Re: [Interest] Add row to model *with data*?

2019-08-16 Thread Jérôme Godbout
ntent changes). -Original Message- From: Interest On Behalf Of Matthew Woehlke Sent: August 15, 2019 5:42 PM To: qt qt Subject: [Interest] Add row to model *with data*? So... I have a (subclass of) QAbstractItemModel. This class internally represents data using some other container, whic

Re: [Interest] Add row to model *with data*?

2019-08-16 Thread Giuseppe D'Angelo via Interest
Il 15/08/19 23:42, Matthew Woehlke ha scritto: Is there any way, with the existing QAbstractItemModel API, to specify the data that the row should contain in the same call that adds the row? Even better, is there any way to ask the model to add a row, with data, but*not* specify where the row is

[Interest] Add row to model *with data*?

2019-08-15 Thread Matthew Woehlke
So... I have a (subclass of) QAbstractItemModel. This class internally represents data using some other container, which has specific requirements on both the item, and on the order of items. Thus, I can't just add rows anywhere and with no data, to be filled in later. My users are intended to wor