How to Open New Window in Maximized Mode(Solved)
-
wrote on 26 Aug 2014, 12:39 last edited by
Hi,
For my application I need to open a new window in Maximized mode,
From Parent I Opened new window like
@onDoubleClicked: {
var component = Qt.createComponent("newWindow.qml")
var window = component.createObject(root)
window.show()}@
And I created my new window like below, here I set visibility: "Maximized"
@ApplicationWindow {
id: newWindow
visibility: "Maximized"
visible: true
width: 1080
height: 680
.....................
....................
}@But the new window is not opening in Maximized mode, am I doing anything wrong ?
Any help will be appreciated......
-
wrote on 26 Aug 2014, 13:01 last edited by
I think it should be
@
visibility: Window.Maximized
@ -
Hi,
It is showing it in Maximized mode, but since there is no component in it, it is rendered as transparent
Add this in the ApplicationWindow and you will notice
@
ApplicationWindow {
id: newWindow
visibility: "Maximized"
visible: true
Rectangle {
anchors.fill: parent
color: "red"
}
}
@ -
wrote on 26 Aug 2014, 14:05 last edited by
Hi, thanks for reply....
Actully there are many components in the window, that's why I put the dotted lines....
-
wrote on 26 Aug 2014, 16:14 last edited by
Try this then:
@
window.showMaximized()
@ -
wrote on 26 Aug 2014, 17:41 last edited by
Hi, thanks for the replay,
@window.showMaximized()@
works fine.
-
This too should work,
@
onDoubleClicked: {
var component = Qt.createComponent("AppWin.qml")
var window = component.createObject(root)
window.show()
}
@@
ApplicationWindow {
id: newWindow
visibility: "Maximized"
visible: true
Rectangle {
anchors.fill: parent
color: "red"
}
}
@here no dimensions specified, just the visibility property set to Maximized.
-
This too should work,
@
onDoubleClicked: {
var component = Qt.createComponent("AppWin.qml")
var window = component.createObject(root)
window.show()
}
@@
ApplicationWindow {
id: newWindow
visibility: "Maximized"
visible: true
Rectangle {
anchors.fill: parent
color: "red"
}
}
@here no dimensions specified, just the visibility property set to Maximized.
wrote on 24 May 2020, 05:01 last edited by@p3c0 It worked!!