Quantcast
Channel: Qt DevNet forums: Qt Quick 1283365070**
Viewing all articles
Browse latest Browse all 4972

Window width and height in QML

$
0
0
Hello I’ve got a strange question. Is it possible to find out a root qml Item size when the window is maximized (viewer.showMaximized(); method is used). I’m asking because this code Item {     id: root     Component.onCompleted:    console.log("width" + root.width) } Prints 0 and as a result I cannot adjust item’s children base on parent width/height. I’ve tried to play with viewer.setResizeMode(QQuickView::SizeRootObjectToView); but it’s not going to help. Thanks a lot, Maxim

Viewing all articles
Browse latest Browse all 4972

Trending Articles