Hello,

I have a table. I change one column's size when user hovers it. Each row in this column can require different "hovered" width. And I would like it to return back in 3 seconds after mouse pointer left it.

So, I use this:

property bool viewSpeedColumnHovered: false
property int  viewSpeedColumnHoveredWidth: 0
property double viewSpeedColumnNotHoveredSinceTime: 0

These properties are set outside of my control and the question is not about them.

To achieve the above I use this property:

//keephoveredwidthatmaxrecentvalue+3secondsafterleavinghoveredstate
property int speedColumnHoveredWidth: downloadsViewSpeedColumnHovered ?
Math.max(speedColumnHoveredWidth, viewSpeedColumnHoveredWidth) :
                                              (currentTime - viewSpeedColumnNotHoveredSinceTime < 3000) ? speedColumnHoveredWidth :
                                              0

When I hover the column first time - all is OK. But after 3 seconds has passed, it returns to 0. My column became normal again. Then I hover it again and get this strange message:

QML ViewHeaderColumnsWidthCalc: Binding loop detected for property "speedColumnHoveredWidth"

I can't understand how can this be... If Math.max returns the property itself (speedColumnHoveredWidth), then it should not generate "changed" signal (property remains the same).

_______________________________________________
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest

Reply via email to