clousque
22nd August 2017, 08:13
Hi there,
I have a rectangle on which I want to put some elements positioned along x and y. To do this, I used a model in C++ and a ListView in QML. The delegate has a bind on x and y properties referring to a data of the model through a C++ conversion function. This works fine on x property but not on y property.
I put a trace into onXchanged and onYchanged. X contains the correct value. Y gets the correct value then there's a second trace (this does not happen on x) indicating that y is 0 while the conversion function is called only once.
Any idea?
Thanks
Qt4.8.5, QtQuick 1.1
I have a rectangle on which I want to put some elements positioned along x and y. To do this, I used a model in C++ and a ListView in QML. The delegate has a bind on x and y properties referring to a data of the model through a C++ conversion function. This works fine on x property but not on y property.
I put a trace into onXchanged and onYchanged. X contains the correct value. Y gets the correct value then there's a second trace (this does not happen on x) indicating that y is 0 while the conversion function is called only once.
Any idea?
Thanks
Qt4.8.5, QtQuick 1.1