Window is a Qt-based replacement for the native system window frame.
It provides a fully custom title bar, window controls (close, minimize, maximize),
support for resizing, and dark mode theming.
- Frameless custom window (replaces native OS frame).
- Resizable with custom hit-testing.
- Custom title bar with close, minimize, and maximize buttons.
- Dark mode with themed icons.
- Active/inactive state highlighting.
- Embeddable content area for your application UI.
- Interactive custom widgets in title bar (clickable property support).
- Copy
Window.h
andWindow.cpp
into your project’ssrc/
folder. - Include the header in your code:
#include "Window.h"
#include <QApplication>
int main(int argc, char *argv[]) {
QApplication app(argc, argv);
// Create custom window
Window w;
w.setGeometry(100, 100, 800, 600);
w.show();
return app.exec();
}
QPushButton *btn = new QPushButton("Click Me", window._contentArea());
QVBoxLayout *layout = new QVBoxLayout(window._contentArea());
layout->addWidget(btn);
// Adding a button into custom title bar (interactive)
QPushButton *titleBtn = new QPushButton("Title Action", w._CustomTitleBarArea());
titleBtn->setProperty("clickable widget", true); // Mark as clickable
w._titleBarLayout()->addWidget(titleBtn);
The custom title bar can hold widgets, but by default, the whole title bar is treated as draggable space. To make a widget clickable (interactive), you must set:
myWidget->setProperty("clickable widget", true);
If not set, the widget will be considered part of the draggable title bar.