0

I want to make cross-platform app in Qt Quick - QML.
Something like this:

enter image description here

But don't know - how to make this, because of rounded corners in Win 11.
App will starts on both Windows (10 and 11)
And frame icons (hide, close, fullscreen) and corners should me standart, but "S" logo - not.

Can you help me with advice how to code this or what do you see as a possible solution?
Thanks!

  • Possibly https://stackoverflow.com/questions/18764687/qml-window-with-transparent-mask can be of help – Amfasis Oct 03 '22 at 06:33
  • @Amfasis - Thanks! But problem not in transparanty. Probem is that I need standart frame with logo with transparenty on it – Alrott SlimRG Oct 03 '22 at 06:58
  • I think you will have to roll your own frame completely. One thing worth trying is using negative margins with this transparency mask, so that you can have the logo "stick out" from the standard frame – Amfasis Oct 03 '22 at 07:16
  • @Amfasis "negative margins" - what is it? – Alrott SlimRG Oct 03 '22 at 07:29
  • @AlrottSlimRG "standard frame"? What exactly do you mean by "standard frame"? AFAIK, if you need a custom frame window with native functionality, you must reimplement those features yourself on the Cpp side. Other UI designs could be made using QML `Shapes`, `SVG`, or `ShaderEffect`. Also, have a look at [this](https://github.com/wangwenx190/framelesshelper). – SMR Oct 03 '22 at 10:16
  • @AlrottSlimRG with negative margins I mean that you create a mask which is bigger than the frame itself (i.e. `anchors.fill: parent; anchors.topMargin: -10`) – Amfasis Oct 03 '22 at 13:32
  • https://www.qt.io/blog/custom-window-decorations – iam_peter Oct 04 '22 at 09:43

1 Answers1

0
  1. We need to make frameless borber by flag:

    flags: Qt.Window | Qt.FramelessWindowHint

  2. We need to separate title on 2 pieces (left, with Logo, and rigth, with buttons). Rigth side can be made by WinApi, or QML.

  3. Rigth side can be made only by custom QQuickPaintedItem:

Example here: https://gist.github.com/oKcerG/b9527a638b01523c3c9c06647d373338