https://github.com/diegoiast/qmdilib
This is a simple mdi library for Qt6
https://github.com/diegoiast/qmdilib
cmake cpp qt
Last synced: 4 months ago
JSON representation
This is a simple mdi library for Qt6
- Host: GitHub
- URL: https://github.com/diegoiast/qmdilib
- Owner: diegoiast
- License: other
- Created: 2018-08-28T06:16:45.000Z (almost 8 years ago)
- Default Branch: main
- Last Pushed: 2026-02-06T16:17:43.000Z (5 months ago)
- Last Synced: 2026-02-07T00:30:48.512Z (5 months ago)
- Topics: cmake, cpp, qt
- Language: C++
- Homepage:
- Size: 1.63 MB
- Stars: 2
- Watchers: 2
- Forks: 3
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- Changelog: changelog
- License: COPYING
Awesome Lists containing this project
README
# qmdilib - library for manupulating menus/toolbars for Qt6
| Normal menus | Advanced menus |
| :----------------------------: | :------------------------------: |
|  |  |
This is a simple mdi library for Qt 6. The goal of this project,
is to provide an easy way to modifying menus and toolbars of windows
on demand. This can be used to present different menus and toolbars to
widgets inside a QTabWidget, hiding or showing a different set of menus
on demand or even enabling a small plugin system.
See the HTML manual available at the doc/html directory.
## Usage
You can consume the code as a CMake library (`git submodule` is an option), and then
include the library. You can also use [CPM](https://github.com/cpm-cmake/CPM.cmake) (the library will eventually be added to
vcpkg and connan repos):
``` CMake
include(cmake/CPM.cmake)
# you probably don't need to build examples into your project
set(QMDILIB_BUILD_EXAMPLES off)
CPMAddPackage("gh:diegoiast/qmdlib#main")
add_executable(foo ... )
target_link_libraries(foo PRIVATE qmdlib)
```
Then follow the exaple https://github.com/diegoiast/qmdilib/blob/main/demos/demo1/mainwindow.cpp
on how to merge clients on/off by demand.
See https://github.com/diegoiast/qmdilib/blob/main/demos/demo2/mainwindow2.cpp
for instrctions on adding different types of clients into a QTabWidget
The dessign of this library can be shown in this UML:

## Config
A new feature added to this library, is a shared configuration with schema. Configuration
is done per module (programmer defined), and you can query keys (values) from it. The user
can choose to restore the configuration to the default values. UI for the configuration
is done automatically (constructed from the schema provided).
See https://github.com/diegoiast/qmdilib/blob/main/demos/demo3/main3.cpp for such example.
Full API usage can be see in the unit tests.
## License
The license of this library is LGPL version 2 or 3 as you need.
## Acknowledgements
I would like to thank these people for helping me with the development of this
library:
* Nox PasNox for the patch for using QWorkspace as a mini
qmdiServer when stored into a qmdiTabWidget (removed in Qt6)
* Henry badinter for many suggestion in the
internal interfaces of qmdilib and his ediuk application which uses qmdilib
for many of it's internal interfaces