Op 10-1-2013 17:46, Alberto Mardegan schreef:
Hi all!
I'd like to make C++ models more usable from QML; in the net there
are several blog posts illustrating how to achieve that, but IMHO it
would be better if at least some of these handy features were in
QAbstractListModel itself:
-
Perhaps an alternative approach would be to create a proxy model for
exporting to QML. It could include all the methods you need, but it
would not complicate QAIM itself. It seems to me that all the methods
you need can be implemented in terms of the already existing
functionality in QAIM, so
On 01/14/2013 09:29 AM, André Somers wrote:
I am not fan of this change. I think the API of QAIM is already very
complex. Adding more methods that basically only sort-of mirror existing
methods but for a more confined use-cases only makes that situation
worse. For instance, you now get a
Op 14-1-2013 11:07, Alberto Mardegan schreef:
On 01/14/2013 09:29 AM, André Somers wrote:
I am not fan of this change. I think the API of QAIM is already very
complex. Adding more methods that basically only sort-of mirror existing
methods but for a more confined use-cases only makes that
On 01/14/2013 11:37 AM, André Somers wrote:
[...]
top of them. Note that you can also use a proxy to map a table model to
a list by mapping the data in columns to different roles. The base class
would not be a QListModel, but the data would be available from the
first column anyway. When using
On Mon, Jan 14, 2013 at 3:37 AM, Alberto Mardegan
ma...@users.sourceforge.net wrote:
On 01/14/2013 11:37 AM, André Somers wrote:
[...]
top of them. Note that you can also use a proxy to map a table model to
a list by mapping the data in columns to different roles. The base class
would not be
On 01/12/2013 11:59 PM, Nils Jeisecke wrote:
Hi,
what about adding a new Quick item for enhanced QAbstractItemModel access.
ListModelAdapter {
id: myModelAdapter
sourceModel: myModel
}
ListView {
model: myModelAdapter.sourceModel
delegate: Text {
MouseArea {
Sorry for top-posting. I'm writing from my phone.
I've had a class like this for a project of mine. It exposed signals for
adding, removing and changing rows as well as the count, data and setData
methods.
This helped me peek and poke at a QAbstractLisaModel from JavaScript.
Cheers,
Johan
On
On 01/13/2013 10:09 PM, Johan Thelin wrote:
Sorry for top-posting. I'm writing from my phone.
I've had a class like this for a project of mine. It exposed signals
for adding, removing and changing rows as well as the count, data and
setData methods.
This helped me peek and poke at a
On 01/10/2013 05:46 PM, Alberto Mardegan wrote:
I'd like to make C++ models more usable from QML; in the net there
are several blog posts illustrating how to achieve that, but IMHO it
would be better if at least some of these handy features were in
QAbstractListModel itself:
- count
Hi,
what about adding a new Quick item for enhanced QAbstractItemModel access.
ListModelAdapter {
id: myModelAdapter
sourceModel: myModel
}
ListView {
model: myModelAdapter.sourceModel
delegate: Text {
MouseArea {
onClicked: console.log(myModelAdapter.data(model.index, myRole)
On Jan 10, 2013, at 5:46 PM, Alberto Mardegan ma...@users.sourceforge.net
wrote:
Hi all!
I'd like to make C++ models more usable from QML; in the net there
are several blog posts illustrating how to achieve that, but IMHO it
would be better if at least some of these handy features were
On Thu, Jan 10, 2013 at 8:46 AM, Alberto Mardegan
ma...@users.sourceforge.net wrote:
Hi all!
I'd like to make C++ models more usable from QML; in the net there
are several blog posts illustrating how to achieve that, but IMHO it
would be better if at least some of these handy features were
Alberto sayeth:
Hi all!
I'd like to make C++ models more usable from QML; in the net there
are several blog posts illustrating how to achieve that, but IMHO it
would be better if at least some of these handy features were in
QAbstractListModel itself:
- count property
-
On Thu, Jan 10, 2013 at 11:06 AM, Charley Bay charleyb...@gmail.com wrote:
QUESTION: Alan seems to suggest the (C++) QAIM/QML might be changed/updated
in the near-future (and that was the purpose for the question in this
thread). Is that to handle the model or the item, or both?
Whoa, when I
15 matches
Mail list logo