how to insert windows in a window ?
-
Hi,
In this simple qml code creating and placing a window:
mport QtQuick 2.9
import QtQuick.Window 2.2Window {
visible: true
x:1200
y:600
color:"blue"
width: 60
height: 60
title: qsTr("Hello World")
}what should I add to create:
1)inside, a new rectangular window?
2)a colored circular button placed at a precise location (x, y) in this window ?
3)a colored rectangular button placed at a precise place (x, y) in this window ?
4)of text in this button or rectangular window ?thanks
-
Hi,
In this simple qml code creating and placing a window:
mport QtQuick 2.9
import QtQuick.Window 2.2Window {
visible: true
x:1200
y:600
color:"blue"
width: 60
height: 60
title: qsTr("Hello World")
}what should I add to create:
1)inside, a new rectangular window?
2)a colored circular button placed at a precise location (x, y) in this window ?
3)a colored rectangular button placed at a precise place (x, y) in this window ?
4)of text in this button or rectangular window ?thanks
@signalK said in how to insert windows in a window ?:
1)inside, a new rectangular window?
Please read the docs.
2)a colored circular button placed at a precise location (x, y) in this window ?
Either use RoundButton or Rectangle with radius and a MouseArea.
3)a colored rectangular button placed at a precise place (x, y) in this window ?
Either use Button or Rectangle and a MouseArea.
4)of text in this button or rectangular window ?
I don't understand this sentence.
By the way, setting the UI up using hardcoded x, y coordinates is in most cases a bad idea. It is way better to use anchors or layouts.