QWidgetDemo: 60+ Standalone Qt Widget and Tool Demos in One Repository
A collection of open-source Qt demos, expected to grow past 100, continuously updated and improved. The code is simple, readable and well-commented, with each demo as an independent project, making them great for beginners. Free to share and reuse; donations are declined. Comments welcome. WeChat public account: Qt in Practice / Qt Basics and Beyond / Qt Tutorials.
At a glance
- What is it?
- A collection of independent Qt example projects covering custom controls, serial and network debugging tools, video panels, frameless windows and UI styling. It is aimed at Qt beginners who want small, self-contained programs instead of one large application.
- Who is it for?
- Adopt QWidgetDemo if you are learning Qt widgets and want a specific, small program to read or adapt, such as the battery control, the frameless window base class or the serial debugging tool. Do not adopt it if you need a supported library with a stable API, a release history or a licence GitHub recognises.
- Can I use it commercially?
- Check first. The repository uses a licence we do not classify automatically, so read its LICENSE file before any commercial use.
- Is it still maintained?
- Activity is slowing. The repository last received commits 6 months ago.
- What is it written in?
- Mainly C++, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on November 15, 2026, and from our analysis. They are not legal advice.
Star history
- feiyangqingyun/QWidgetDemo6,949 ★ · +7
| Repository | 2026-09-23 | 2026-11-15 |
|---|---|---|
| feiyangqingyun/QWidgetDemo | 6.9k | 6.9k |
7 Stars in the last 53 days, measured from the daily GitHub snapshot. Compare with other projects
Editorial analysis
What QWidgetDemo Actually Is
QWidgetDemo is not a library you link against. It is a repository of separate Qt projects, each with its own directory and its own .pro file, collected under one root so that a reader can browse them in one place. The README describes the intent as more than a hundred demos over time, and states that every project is independent and written to be readable for beginners, with detailed comments.
The root contains six category directories: control for custom widgets, tool for standalone utilities, video for playback and monitoring panels, widget for window-level behaviour, ui for styling and main-window layouts, and other for assorted examples. A seventh directory, third, holds wrappers around third-party code such as the miniblink browser kernel and qcustomplot charts, and netfriend collects contributions from other people.
The audience is narrow and clear. Someone who has read a Qt book and now wants to see how a battery indicator, an IP address input field, a log redirection widget or a lunar calendar control is put together. The value is in the small scale of each piece, not in a framework.
The Directory Layout Is the Documentation
There is no API reference. The README's directory table is the map, and it is the most useful page in the project. Each row gives a category, a directory name, a Chinese display name and a short description. The table marks some entries as high quality in bold, including battery, devicebutton, navbutton, savelog, saveruntime, comtool, nettool, netserver, base64helper, countcode, keytool, videobox, videopanel, framelesswidget, lunarcalendarwidget, styledemo, uidemo08, uidemo10, iconhelper, dbpage, echartgauge, miniblink and qcustomplotdemo.
That bold marking is a judgement by the author, not a quality metric, and it is worth treating as a reading order rather than a ranking. If you want to understand how the project handles custom painting, start with the control directory. If you want a runnable utility rather than a component, the tool directory has serial, network, base64, email and code-counting programs.
The screenshots section mirrors the same structure, with an entry per demo. That is how you can preview a demo before building it, since no hosted demo exists.
Building One Demo Instead of the Whole Tree
The README gives two build paths. You can open QWidgetDemo.pro at the root and compile everything at once, or you can go into a single directory and open the .pro file there. The second path is the one that matters in practice: building the whole tree pulls in every subproject, including ones that depend on third-party code in the third directory.
The README also notes that the compiled executables land in a bin directory at the same level as the source. And it warns that if some subprojects do not load, you should open the .pro file in that directory and read the comments inside it, because the loading is conditional.
The README recommends cloning with the git command line rather than downloading a zip archive. It states that after re-extracting a downloaded archive, files can produce an "Excess closing brace" error, and it does not explain why. That is a concrete reason to avoid the archive route even though it is the faster one.
The README claims support for Qt4.6 through Qt6.6 and for Windows, Linux, macOS and UOS. It also states that a small number of subprojects do not support some Qt versions, for example Qt6, and that those are skipped automatically. Treat both statements as the author's own testing claim rather than something you can rely on for your specific toolchain.
Where the Collection Breaks Down
The biggest limitation is that the demos are independent by design, so there is no shared base library. If you want the same frameless window behaviour in three of your own screens, you copy the code from framelesswidget into each one. Nothing in the repository offers a package, a versioned artifact or a dependency you can declare.
The second limitation is the licence. The repository has a LICENSE file at the root, but GitHub does not recognise it as a standard licence (it reports NOASSERTION), and the project's own description says only that the code may be freely spread and used, that donations are refused, and that comments are welcome. That is an author's statement, not a licence identifier, and the two can differ. Anyone embedding this code in a commercial product needs to read the LICENSE file directly.
Third, the documentation is in Chinese. The README, the directory descriptions, the comments and the linked articles are all in Chinese, so a reader without the language is limited to reading the source.
Fourth, there is no release history. The repository has no published GitHub releases, so there are no version numbers to pin and no changelog to check before upgrading. You take the master branch as it is at the moment you clone it.
How It Compares to Reading Qt's Own Examples
The obvious alternative is the example set that ships with Qt itself. Qt's examples are organised by module, are translated into English, carry the same licence as Qt, and are tested against the Qt version you have installed. They are the safer source when you want to learn an API correctly.
The difference in approach is that Qt's examples demonstrate the framework, while QWidgetDemo demonstrates finished-looking widgets and small applications. A Qt example will show you how QSerialPort works. comtool shows you a serial debugging assistant with a UI around it. That extra layer is exactly what a beginner lacks, and it is why the project exists.
The second alternative is a widget library such as qcustomplot or Qwt, both of which appear in this repository as third-party integrations. Those are maintained libraries with their own documentation and release cycles. QWidgetDemo wraps them as demonstrations rather than replacing them. If your need is a chart, use qcustomplot directly and read the qcustomplotdemo subproject as an example of wiring it up.
Maintenance, Upgrades and Licence Cost
The repository is not archived, and the last push was on 2026-05-16. The README gives no release cadence, no issue triage policy and no support commitment. The author's contact details in the README are a QQ number, a WeChat ID and several public accounts, which suggests a personal project rather than a maintained product.
Upgrade cost is close to zero in one direction and unbounded in another. Because nothing is packaged, there is nothing to upgrade: you clone again and diff. But because the code is meant to be copied into your own project, every future change to the original is a change you have to notice and apply by hand.
The licence question, covered above, is the one to settle first.
What the Demos Are Not
Several things a reader might expect are absent. There is no test suite mentioned, no CI configuration described and no packaging for any platform. There is no English translation of the documentation. There is no online demo of the widgets, only the screenshots section and the video links in the README.
The video directory deserves a separate note. It contains videobox, videopanel and videowindow for monitoring layouts, plus playffmpeg, playvlc and plaympv as separate playback backends (the screenshots section also lists playmdk). Each of those depends on an external library that you must install yourself. If you only want a layout grid for camera tiles, videobox and videopanel are the relevant pieces; the playback backends are a different problem with their own dependencies.
Finally, the repository is not a starting template for an application. There is no application skeleton, no settings system, no logging framework shared across demos. It is a shelf of parts. That is the honest description, and it is also the reason it is useful.
Editorial conclusion
Adopt QWidgetDemo if you are learning Qt widgets and want a specific, small program to read or adapt, such as the battery control, the frameless window base class or the serial debugging tool. Do not adopt it if you need a supported library with a stable API, a release history or a licence GitHub recognises. Before copying anything into your own codebase, verify two things yourself: which Qt versions the particular subproject you want actually compiles under, since the README warns that a few subprojects skip certain versions, and the terms of the LICENSE file at the repository root, which GitHub reports as NOASSERTION.
Frequently asked questions
How do I build a single QWidgetDemo project instead of the whole repository?
Open the .pro file inside the subproject directory you want, for example control/battery, and build that. The README states that the compiled executable ends up in a bin directory at the same level as the source.
Why do some QWidgetDemo subprojects not load?
The README says to open the .pro file in that directory and read the comments inside it, because loading is conditional. It also states that a few subprojects do not support certain Qt versions, such as Qt6, and are skipped automatically.
Which Qt versions does QWidgetDemo support?
The README claims testing from Qt4.6 through Qt6.6 across Windows, Linux, macOS and UOS. It also warns that a small number of subprojects do not support some Qt versions and are skipped.
What is QWidget?
QWidget is the base class for user interface objects in Qt, and every demo in QWidgetDemo is built on it. The repository's name refers to that class, and its subprojects are individual Qt widget and application examples.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/feiyangqingyun-qwidgetdemo)Star history chart for your README
[](https://hysenlabs.com/projects/feiyangqingyun-qwidgetdemo)Was this useful?