Open new window on button click
-
It's a really simple maybe stupid question, but i've been looking for this all day without success.
I have a main window (main.qml) with a button. When this button is clicked I want to open a new window (window2.qml). I want to do this using the 'onClicked:' component, and found online, to open a window, I can use 'show()', but I have not been successful in combining these two.
I'm new to this, would love every answer :)
Thanks in advance.
-
It's a really simple maybe stupid question, but i've been looking for this all day without success.
I have a main window (main.qml) with a button. When this button is clicked I want to open a new window (window2.qml). I want to do this using the 'onClicked:' component, and found online, to open a window, I can use 'show()', but I have not been successful in combining these two.
I'm new to this, would love every answer :)
Thanks in advance.
@leon-missoul
Hi. This, and your previous topics about QML, should all be posted to the QML sub-forum, https://forum.qt.io/category/12/qml-and-qt-quick, for best answers. -
Thanks, I was not aware of that.
-
Thanks, I was not aware of that.
@leon-missoul
That's no problem. I see you have now re-posted this there as https://forum.qt.io/topic/122624/open-new-window-on-button-click. -
Yes, correct.
Any possible way you can answer it?
-
Locking this topic since the other one is in the correct sub-forum.
Next time please ask a moderator to move it rather than duplicate.