how to create a colorful window border ?
-
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 in Window to create:
1)a window border of a certain thickness ?
2)a colorful window border ?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 in Window to create:
1)a window border of a certain thickness ?
2)a colorful window border ?thanks
@signalK said in how to create a colorful window border ?:
1)a window border of a certain thickness ?
2)a colorful window border ?Both these aspects are controlled by your window manager (your Operating System) and Qt has no influence over it. So, in short, it cannot be done (easily).
There are, however, some ways to achieve this:
- use windowFlags to disable the window border completely
- then paint your own using a simple Rectangle QML element