Thursday, July 30, 2015

Qml item state undefined

I'm working on a info screen application done in Qml that will be run on a Raspberry Pi. I'm doing the main coding on the desktop and everything runs well.

On the Pi I'm using a self build of Qt 5.4.2 and it worked very well, until yesterday that is. Suddenly I got no display of my info slides. Strange thing, it worked perfeclt fine before.

After a good bit of cursing I found that my Image didn't show, because for some odd reason the binding of

visible: root.state=='rotating'

was evaluated as false. Well, how the hell is that possible was the next question. And debug output of the state randomly said "undefined", eh ?? WTF!?

What I don't understand is how it suddenly crept up as I've used states before too in my app. Anyway, it turns out that it is a known bug (QTBUG-41649) in gcc-4.6 on arm that miss compiles a specific file in the Qml library.

 Fix applied and all seems well. I hope.

No comments: