On Sun, Oct 6, 2024 at 7:52 PM Sze Howe Koh <szehowe....@gmail.com> wrote:
> > It's invisible for a different reason. Text (Item) already has an "x" > property: https://doc.qt.io/qt-6/qml-qtquick-item.html#x-prop > > `visible: x` refers to the Text's x-position, which is 0 here. > Ooops. Thank you! :) > > Writing `property var x` is equivalent to writing `property var x: > undefined` since you didn't give it an initial/default value. Is it > expected that [undefined] does not implicitly convert to bool? I don't > have an official answer, but I certainly won't want my code to rely on > undefined variables. > > > Well, I'm not a javascript expert, but undefined should evaluate to false there. Maybe it's not the case for QML...
_______________________________________________ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest