You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

77 lines
1.9 KiB

import QtQuick 2.12
import QtQuick.Controls 2.12
import QtQuick.Window 2.12
Item{
Loader{
id: source
sourceComponent: ApplicationWindow{
id: appWindow
width: 800
height: 800
onFrameSwapped: {
windowContent.grabToImage(function(result) {
secondWindow.frame = String(result.url);
});
}
visible: true
screen: Qt.application.screens[0]
Component.onCompleted: {
showFullScreen()
appWindow.frameSwapped()
}
Item{
id: windowContent
width: parent.width
height: parent.height
Label{
anchors.centerIn: parent
font.pointSize: 24
text: "1"
}
Item {
id: foo
width: 100; height: 100
Rectangle { x: 5; y: 5; width: 60; height: 60; color: "red" }
Rectangle { x: 20; y: 20; width: 60; height: 60; color: "orange" }
Rectangle { x: 35; y: 35; width: 60; height: 60; color: "yellow" }
}
Button{
anchors.verticalCenterOffset: 24
anchors.centerIn: parent
text: "Test Button"
onClicked: {
visible= false
}
}
}
Window{
id: secondWindow
visible: true
screen: Qt.application.screens[1]
property alias frame: frameImage.source
Image {
id: frameImage
}
Component.onCompleted: {
showFullScreen()
}
}
}
}
}