[PyQt] how to insertRow() in a QAbstractListModel?
michaelkenth at gmail.com
Thu Dec 10 04:16:29 GMT 2015
On Wed, Dec 9, 2015 at 1:24 PM, <c.buhtz at posteo.jp> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> On 2015-12-06 02:20 <c.buhtz at posteo.jp> wrote:
> > The signature (arguments/parameters) of the method doesn't have data
> > in. Where is the data to be inserted?
Not 100% sure about that method, but I believe the idea is that would
insert "empty" / "new" items (thus no data parameter).
In the past I've simply done:
# code to modify underlying python list goes here, however you choose
Using these two methods causes the view(s) to requery the data
after endInsertRows() (given that you've implemented data() correctly)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the PyQt