Hey,
first of all: root.width is printing you 0 because it’s width is 0. From where do you want to find out your QML Item size? If you want to find it out from QML then you’ll have to do it like you already did. If you want to find it out from Cpp use QObject::property on your rootObject. Could you please describe more what you’re trying to do?
↧