Two Questions
-
Resizing the window: by default the window, when made smaller, does not resize the contents inside to fit. How to fix?
Secondly, How to remove the native windows "window" so I can have a borderless window with my own integrated Exit,minimize,max buttons?
-
@Lahearle Qt isn't a mind reader -- it doesn't know that when you resize a window, you want to resize its contents, too. I'd recommend looking at layouts, and basing your sizing of the contents on the size of the window that holds them.
For your second question, try adding this line to your ApplicationWindow:
flags: Qt.FramelessWindowHint
-
Thanks the borderless window/window hints I didn't know about.
But I tried layouts and it says that ApplicationWindows are not supported by qt designer (so I just used a regular "Window")
Underneath GridLayouts and anchors.fill:parent all examples show them declaring each individual component in it, is there a way to just declare every component contained in a particular screen file, like:Window {
width: mainScreen.width
height: mainScreen.height
visible: true
title: "OOGA BOOGA"
flags: Qt.FramelessWindowHintGridLayout{ anchors.fill: parent Screen01 { id: mainScreen width: 1926 } }
}
-
@Lahearle I'm not sure what you're asking, but assigning a hard-coded value (like 1926) to a subordinate item is going to be problematic. I'd prefer you assign sizes to your main window, and derive sizes for contained objects from that.
Window { id: mainWindow visible: true width: 1926 GridLayout { anchors.fill: parent Screen01 { id: mainScreen width: mainWindow.width // etc.
As an aside, I'm not sure why you'd want a GridLayout with an item (Screen01) that fills your entire main window.