Skip to content

pedrolcl/frameless-qt-poc

Repository files navigation

frameless-qt-poc

FramelessWindow Demo for Qt Applications (POC)

screenshot

Why this exists?

Since Qt 5.15 there are two new QWindow slots (functions):

These functions can be used to implement frameless windows ( using the Qt::FramelessWindowHint window flag ) that can be moved and resized like normal windows having a frame and a title bar, but the application is totally free to draw those elements. This is called Client Side Window Decorations (CSD). There is a similar QML based demo and also a blog post by Johan Helsing.

This POC is not design oriented, but on functionality and simplicity. There are several other similar demos with much more elaborated design, and based on native functions which may be of interest for older Qt versions, for instance:

This is an easier way, and has the advantage of working on Windows, macOS and Linux (both X11/xcb and Wayland). It can be used with projects based on Qt 5.15 and Qt 6.x.

Results

Tests built with Qt 5.15.2 and Qt 6.3.0

✅ means that it is usable.

❌ means that it is not usable.

❓ means that the results are not conclusive.

Platform: Qt5 + move window Qt5 + resize Qt6 + move window Qt6 + resize
Windows
macOS
Linux X11/xcb
Linux Wayland

Other Projects using the FramelessWindow class