I’m updating a project of mine from a complicated C++ & Common Lisp mess to just QML and JavaScript. Inspired by @attah’s S’Play and @poetaster’s dwd.
Now JavaScript has many advantages: no complicated build process, no architecture limitations, well-known, etc. but QML’s support for it is lacking. Especially the version Sailfish is using.
With that out of the way. I’d like to know how, given a UI element has an objectName
defined, I can toggle an attribute on that object and have it work. More specifically:
How can I set busy_rect.visible
to true
from another component:
-
busy_rect
: pusfofefe/harbour-pusfofefe.qml at 5ac802267eefd701fcd62ec432f60280c4b02ea7 - pusfofefe - Codeberg.org - I want to manipulate
busy_rect.visible
from here: pusfofefe/LoginDialog.qml at 5ac802267eefd701fcd62ec432f60280c4b02ea7 - pusfofefe - Codeberg.org
I’ve been spending too much time on this and there’s little to be found online (besides “fall back to C++”). As you can see in the code top-level properties can be manipulated. So I’ve also tried tying visible
to a property but didn’t succeed.