https://github.com/umar-masood/customizable_frameless_subwindow
Provides a custom title bar with close button and dark mode support. Designed to be used inside a parent QWidget as a floating panel or subwindow.
https://github.com/umar-masood/customizable_frameless_subwindow
cpp custom-subwindow custom-window frameless-windows modern-ui qml qss qt windows
Last synced: 8 months ago
JSON representation
Provides a custom title bar with close button and dark mode support. Designed to be used inside a parent QWidget as a floating panel or subwindow.
- Host: GitHub
- URL: https://github.com/umar-masood/customizable_frameless_subwindow
- Owner: umar-masood
- Created: 2025-10-02T16:35:42.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2025-10-03T09:52:36.000Z (9 months ago)
- Last Synced: 2025-10-03T11:41:05.667Z (9 months ago)
- Topics: cpp, custom-subwindow, custom-window, frameless-windows, modern-ui, qml, qss, qt, windows
- Language: C++
- Homepage:
- Size: 12.7 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# SubWindow
**SubWindow** is a reusable Qt widget that acts as a **frameless subwindow** inside another QWidget.
It provides a custom **title bar**, **close button**, and supports **dark mode** for modern styled UIs.
---
## ✨ Features
- Frameless child window (no native OS frame).
- Custom title bar with close button.
- Dark mode and themed icon support.
- Extend content into titlebar without facing any difficulty
## Screenshot

## 🚀 Usage
### Include in your project
1. Copy `SubWindow.h` and `SubWindow.cpp` into your project’s `src/` folder.
2. Include the header in your code:
```cpp
#include "SubWindow.h"
SubWindow *sub = new SubWindow(1000, 720, parentWidget);
sub->show();
```
### How to Add Custom widgets to SubWindow
```cpp
// Create a SubWindow
SubWindow *sub = new SubWindow(parentWidget);
sub->setGeometry(100, 100, 600, 400);
// Add your custom widget
QLabel *label = new QLabel("Hello from SubWindow!", sub->contentArea());
QPushButton *btn = new QPushButton("Click Me", sub->contentArea());
// Optionally arrange them with a layout inside content area
QVBoxLayout *layout = new QVBoxLayout(sub->contentArea());
layout->addWidget(label);
layout->addWidget(btn);
// Show
sub->show();
```