QtNovaFramelessWindow 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).
QtNovaFramelessWindow/
Window.h
Window.cpp
CMakeLists.txt
resources.qrc
- Copy
Window.handWindow.cppinto 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 = new Window;
w->setGeometry(100, 100, 800, 600);
w->show();
return app.exec();
}QVBoxLayout *layout = new QVBoxLayout(window->contentArea());
QPushButton *btn = new QPushButton("Click Me");
layout->addWidget(btn);Important
All application widgets must be parented to the window’s content area.
Warning
QPushButton *btn = new QPushButton("Click Me", window);
Passing window as a parent directly will break layout, resizing and hit-testing
// Adding Widgets to the Title Bar
QHBoxLayout *layout = new QHBoxLayout(window->titleBar());
QPushButton *btn = new QPushButton("Action");
layout->addWidget(btn);
window->setInteractiveTitleBarWidget(btn);Important
To make a widget interactive then must pass that widget to this function:
window.setInteractiveTitleBarWidget(myWidget);
Note
window.setInteractiveTitleBarWidget(myWidget) will automatically ignore the widget if that widget is already passed to this function.
w->setDarkMode(true);w->setBorderColor(QColor("#FF8080"));w->setBackgroundColor(QColor("#FF2054"), QColor("#3F85B6"));Important
The first argument of this function represents the color in Light Mode while other represents color in Dark Mode:
window.setBackgroundColor(const QColor &light, const QColor &dark);
w->setModal(true);Note
It will block all interaction with window.
- Fork the repository.
- Create a new branch for your change.
- Follow the existing code style and structure.
- Do not break window dragging, resizing, or title bar behavior.
- Test your changes before committing.
- Write clear commit messages.
- Update documentation if behavior changes.
- Push your branch to your fork.
- Open a pull request against the main branch.