// main.qml ---------------------------------: import QtQuick 2.5 import QtQuick.Controls 1.4
ApplicationWindow { visible: true width: 480 height: 720 // comment out StackView to make it work, when doing so, uncomment visible: true for LoginScreen (default visible false) StackView { id: stackView initialItem: loginScreen } LoginScreen { id: loginScreen width: parent.width height: parent.height // visible: true } } // LoginScreen.qml --------------------------: import QtQuick 2.5 Rectangle { id: screen visible: false Column { anchors.top: parent.top anchors.horizontalCenter: parent.horizontalCenter anchors.margins: 100 } Column { anchors.centerIn: parent width: screen.width * .8 spacing: 10 Rectangle { border.width: 1 width: parent.width height: username.height * 1.1 anchors.margins: 50 TextInput { anchors.centerIn: parent anchors.margins: 50 id: username width: parent.width height: implicitHeight font.pixelSize: 20 text: "Username" color: "grey" } } Rectangle { border.width: 1 width: parent.width height: password.height * 1.1 TextInput { anchors.centerIn: parent id: password width: parent.width height: implicitHeight font.pixelSize: 20 text: "Password" color: "grey" } } Rectangle { color: "black" width: parent.width height: loginText.implicitHeight * 2 border.width: 1 anchors.horizontalCenter: parent.horizontalCenter Text { id: loginText anchors.centerIn: parent width: implicitWidth height: implicitHeight text: "LOGIN" color: "white" } //text } //rect Text { anchors.horizontalCenter: parent.horizontalCenter width: implicitWidth height: implicitHeight text: "(?) Forgot Password" color: "dodgerblue" } } //column Column { anchors.horizontalCenter: parent.horizontalCenter anchors.bottom: parent.bottom anchors.bottomMargin: 25 Text { anchors.horizontalCenter: parent.horizontalCenter text: "Tell me more" color: "dodgerblue" anchors.bottomMargin: 500 } } //column } //rect // end of source ----------------------------------- > Sent: Tuesday, November 17, 2015 at 2:22 AM > From: Gianluca <gmax...@gmail.com> > To: jh...@gmx.com > Cc: Interest@qt-project.org > Subject: Re: [Interest] StackView weirdness > > Can you post some part of your code. > > > Il giorno 17/nov/2015, alle ore 02:51, jh...@gmx.com ha scritto: > > > I've been using stackview a while now. I started a new project with > > desktop osx 5.5.1. I laid out the UI, made it a component, then added a > > stack view with it set to the initial item set to that component. The UI > > appeared for a second then disappeared. The app was still running. I > > fiddled with it a bit, if I fixed the disappearing problem, then it > > didn't layout the UI correctly. > > > > Anyone have any idea what is going on? > > _______________________________________________ > > Interest mailing list > > Interest@qt-project.org > > http://lists.qt-project.org/mailman/listinfo/interest > > _______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest