How to move main window without the following of child window
-
Here is my code. It is very simple and easy, but I found that when I move the main_window,the child_window will make the same movement. I want child_window remain still when I move main_window,How to realize this? I would be very grateful if someone could tell me.
import QtQuick 2.14
import QtQuick.Window 2.14Window
{
id:main_window
width: 640
height: 480
visible: true
title: qsTr("main_window")
Window
{
id:child_window
width: 300
height: 300
minimumHeight: 300
minimumWidth: 300
visible: true
title: qsTr("child_window")
}
} -
The environment is Qt6.5.3 with MSCV2019
-
Child widgets will always move with the parent. If you do not want this then make these child widgets top level windows (without parent).
-
Here is my code. It is very simple and easy, but I found that when I move the main_window,the child_window will make the same movement. I want child_window remain still when I move main_window,How to realize this? I would be very grateful if someone could tell me.
import QtQuick 2.14
import QtQuick.Window 2.14Window
{
id:main_window
width: 640
height: 480
visible: true
title: qsTr("main_window")
Window
{
id:child_window
width: 300
height: 300
minimumHeight: 300
minimumWidth: 300
visible: true
title: qsTr("child_window")
}
}This post is deleted!