qt-material-widgets/README.md

388 lines
7.5 KiB
Markdown
Raw Normal View History

2024-02-23 13:06:53 +00:00
# Qt Material Design Desktop Widgets [![Language](https://img.shields.io/badge/language-c++-brightgreen.svg)]()
**YouTube** video preview [available here](http://www.youtube.com/watch?v=21UMeNVBPU4).
---
2024-02-23 09:58:11 +00:00
I've been using Qt for a while, the lack of UI framework is a big problem for me.
After building UI components from scratch for a while, I decided to try reusing other's projects, that is no piece of cake.
I found [qt-material-widgets](https://github.com/laserpants/qt-material-widgets), but sadly it seems to be no longer supported.
Pull requests from other developer, such as [move to cmake](https://github.com/laserpants/qt-material-widgets/pull/50) which inspired me on migrating this project from `qmake` to `CMake`, are not accepted anymore.
I'm very honored to try to take over the maintenance of this project, and welcome all pull requests and issues.
2024-02-23 13:06:53 +00:00
## Overview
2024-02-23 09:58:11 +00:00
The original project only supports the qmake build system on Linux platform.
The new project will support both qmake and CMake on as many platforms as possible, mainly Windows, Android ,Linux and MacOS.
2024-02-23 13:06:53 +00:00
## Usage
### use in your own project
2024-02-23 09:58:11 +00:00
2024-02-23 13:06:53 +00:00
#### CMake
1. clone this project
```
git clone https://github.com/Zhang-Tianxu/qt-material-widgets
```
2024-02-23 09:58:11 +00:00
2024-02-23 13:06:53 +00:00
2. create your widgets app with CMake build system
2024-02-23 09:58:11 +00:00
Create *Qt Widgets Application* with CMake project as normal
2024-02-23 13:06:53 +00:00
3. modify `CMakeLists.txt` of your app
1. add *component* as subdirectory of your project
```CMake
add_subdirectory(/path/to/qt-material-widgets/components/ ./components)
```
2. add *include* and *link libraries*:
- add `/path/to/qt-material-widgets/include/qmeterial/` into `target_include_directories` for headers
- add `components` into `target_link_libraries` for `.lib`
2024-02-23 09:58:11 +00:00
2024-02-23 13:06:53 +00:00
Now you can use *qt-material-widgets*, all components list as follows:
2024-02-23 09:58:11 +00:00
2024-02-23 13:06:53 +00:00
#### qmake
2024-02-23 09:58:11 +00:00
2024-02-23 13:06:53 +00:00
1. clone this project
2024-02-23 09:58:11 +00:00
2024-02-23 13:06:53 +00:00
```
git clone https://github.com/Zhang-Tianxu/qt-material-widgets
2024-02-23 09:58:11 +00:00
```
2024-02-23 13:06:53 +00:00
2. create your widgets app with qmake build system
2024-02-23 09:58:11 +00:00
2024-02-23 13:06:53 +00:00
### example
2024-02-23 09:58:11 +00:00
2024-02-23 13:06:53 +00:00
1. clone this project
```
git clone https://github.com/Zhang-Tianxu/qt-material-widgets
```
2024-02-23 09:58:11 +00:00
2024-02-23 13:06:53 +00:00
2. open `CMakeLists.txt`/`qt-material-widgets.pro` in root directory of this repo by Qt Creator
3. select a build Kit and run
2017-10-11 17:29:57 +00:00
2017-09-30 12:24:05 +00:00
2024-02-23 13:06:53 +00:00
## progress
2022-07-14 09:54:17 +00:00
2017-10-05 08:31:01 +00:00
<table>
2017-10-05 08:43:03 +00:00
<tbody>
<tr>
2017-10-05 14:56:10 +00:00
<td colspan="2" align="center"></td>
2017-10-05 08:43:03 +00:00
</tr>
2017-10-11 21:06:22 +00:00
<tr>
<td>
App Bar
</td>
<td>
<code>QtMaterialAppBar</code>
</td>
</tr>
<tr>
<td colspan="2" align="center">
<img src="gifs/appbar.gif" />
</td>
</tr>
<tr>
<td>
Auto Complete
</td>
<td>
<code>QtMaterialAutoComplete</code>
</td>
</tr>
<tr>
<td colspan="2" align="center">
<img src="gifs/autocomplete.gif" />
</td>
</tr>
2017-10-05 08:43:03 +00:00
<tr>
<td>
Avatar
</td>
<td>
<code>QtMaterialAvatar</code>
</td>
</tr>
<tr>
2017-10-05 14:56:10 +00:00
<td colspan="2" align="center">
2017-10-05 08:43:03 +00:00
<img src="gifs/avatar.gif" />
</td>
</tr>
2017-10-12 03:54:50 +00:00
<tr>
<td>
Badge
</td>
<td>
<code>QtMaterialBadge</code>
</td>
</tr>
<tr>
<td colspan="2" align="center">
<img src="gifs/badge.gif" />
</td>
</tr>
2017-10-05 08:43:03 +00:00
<tr>
<td>
Check Box
</td>
<td>
<code>QtMaterialCheckBox</code>
</td>
</tr>
<tr>
2017-10-05 14:54:11 +00:00
<td colspan="2" align="center">
2017-10-05 08:51:26 +00:00
<img src="gifs/checkbox.gif" />
2017-10-05 08:43:03 +00:00
</td>
</tr>
<tr>
<td>
Circular Progress
</td>
<td>
<code>QtMaterialCircularProgress</code>
</td>
</tr>
<tr>
2017-10-05 14:56:10 +00:00
<td colspan="2" align="center">
2017-10-05 08:43:03 +00:00
<img src="gifs/circularprogress.gif" />
</td>
</tr>
<tr>
<td>
Dialog
</td>
<td>
<code>QtMaterialDialog</code>
</td>
</tr>
<tr>
2017-10-05 14:56:10 +00:00
<td colspan="2" align="center">
2017-10-05 08:43:03 +00:00
<img src="gifs/dialog.gif" />
</td>
</tr>
<tr>
<td>
Drawer
</td>
<td>
<code>QtMaterialDrawer</code>
</td>
</tr>
<tr>
2017-10-05 14:57:28 +00:00
<td colspan="2">
2017-10-05 08:43:03 +00:00
<img src="gifs/drawer.gif" />
</td>
</tr>
<tr>
<td>
FAB
</td>
<td>
<code>QtMaterialFloatingActionButton</code>
</td>
</tr>
<tr>
2017-10-05 14:56:10 +00:00
<td colspan="2" align="center">
2017-10-05 08:43:03 +00:00
<img src="gifs/fab.gif" />
</td>
</tr>
<tr>
<td>
Flat Button
</td>
<td>
<code>QtMaterialFlatButton</code>
</td>
</tr>
<tr>
2017-10-05 14:56:10 +00:00
<td colspan="2" align="center">
2017-10-05 08:43:03 +00:00
<img src="gifs/flatbutton.gif" />
</td>
</tr>
<tr>
<td>
Icon Button
</td>
<td>
<code>QtMaterialIconButton</code>
</td>
</tr>
<tr>
2017-10-05 14:56:10 +00:00
<td colspan="2" align="center">
2017-10-05 08:43:03 +00:00
<img src="gifs/iconbutton.gif" />
</td>
</tr>
<tr>
<td>
Progress
</td>
<td>
<code>QtMaterialProgress</code>
</td>
</tr>
<tr>
2017-10-05 14:56:10 +00:00
<td colspan="2" align="center">
2017-10-05 08:43:03 +00:00
<img src="gifs/progress.gif" />
</td>
</tr>
<tr>
<td>
Radio Button
</td>
<td>
<code>QtMaterialRadioButton</code>
</td>
</tr>
<tr>
2017-10-05 14:56:10 +00:00
<td colspan="2" align="center">
2017-10-05 08:43:03 +00:00
<img src="gifs/radiobutton.gif" />
</td>
</tr>
<tr>
<td>
Raised Button
</td>
<td>
<code>QtMaterialRaisedButton</code>
</td>
</tr>
<tr>
2017-10-05 14:56:10 +00:00
<td colspan="2" align="center">
2017-10-05 08:43:03 +00:00
<img src="gifs/raisedbutton.gif" />
</td>
</tr>
<tr>
<td>
Scroll Bar
</td>
<td>
<code>QtMaterialScrollBar</code>
</td>
</tr>
<tr>
2017-10-05 14:56:10 +00:00
<td colspan="2" align="center">
2017-10-05 08:43:03 +00:00
<img src="gifs/scrollbar.gif" />
</td>
</tr>
<tr>
<td>
Slider
</td>
<td>
<code>QtMaterialSlider</code>
</td>
</tr>
<tr>
2017-10-05 14:56:10 +00:00
<td colspan="2" align="center">
2017-10-05 08:43:03 +00:00
<img src="gifs/slider.gif" />
</td>
</tr>
<tr>
<td>
Snackbar
</td>
<td>
<code>QtMaterialSnackBar</code>
</td>
</tr>
<tr>
2017-10-05 14:56:10 +00:00
<td colspan="2" align="center">
2017-10-05 08:43:03 +00:00
<img src="gifs/snackbar.gif" />
</td>
</tr>
<tr>
<td>
Tabs
</td>
<td>
<code>QtMaterialTabs</code>
</td>
</tr>
<tr>
2017-10-05 14:56:10 +00:00
<td colspan="2" align="center">
2017-10-05 08:43:03 +00:00
<img src="gifs/tabs.gif" />
</td>
</tr>
<tr>
<td>
Text Field
</td>
<td>
<code>QtMaterialTextField</code>
</td>
</tr>
<tr>
2017-10-05 14:56:10 +00:00
<td colspan="2" align="center">
2017-10-05 08:43:03 +00:00
<img src="gifs/textfield.gif" />
</td>
</tr>
<tr>
<td>
Toggle
</td>
<td>
<code>QtMaterialToggle</code>
</td>
</tr>
<tr>
2017-10-05 14:56:10 +00:00
<td colspan="2" align="center">
2017-10-05 08:43:03 +00:00
<img src="gifs/toggle.gif" />
</td>
</tr>
</tbody>
2017-10-05 08:31:01 +00:00
</table>
2017-09-30 07:02:53 +00:00
#### Implemented components
2017-09-28 21:49:20 +00:00
2017-10-12 03:49:42 +00:00
- [x] App Bar
- [x] Auto Complete
2017-09-28 21:49:20 +00:00
- [x] Avatar
2017-09-28 22:30:10 +00:00
- [x] Badge
2017-09-29 07:33:02 +00:00
- [x] Check Box
2017-09-29 09:14:24 +00:00
- [x] Circular Progress
2017-09-29 23:42:41 +00:00
- [x] Dialog
2017-09-30 00:20:12 +00:00
- [x] Drawer
2017-09-29 09:52:39 +00:00
- [x] Floating Action Button
- [x] Flat Button
2017-09-29 13:44:36 +00:00
- [x] Icon Button
2017-09-29 13:34:52 +00:00
- [x] Progress
2017-09-29 14:59:17 +00:00
- [x] Radio Button
2017-09-29 09:52:39 +00:00
- [x] Raised Button
2017-09-30 01:14:51 +00:00
- [x] Scroll Bar
2017-09-29 13:53:18 +00:00
- [x] Slider
2017-09-29 23:13:31 +00:00
- [x] Snackbar
2017-09-29 17:49:20 +00:00
- [x] Tabs
2017-09-29 17:16:15 +00:00
- [x] Text Field
2017-09-29 16:52:57 +00:00
- [x] Toggle
2017-09-28 21:49:20 +00:00
2017-10-02 20:26:28 +00:00
#### Work in progress
2017-10-06 11:44:32 +00:00
- [ ] Divider
2017-10-06 16:14:42 +00:00
- [ ] List
- [ ] List Item
2017-10-15 17:17:53 +00:00
- [ ] Menu
2017-10-06 11:44:32 +00:00
- [ ] Paper
2017-10-12 04:10:06 +00:00
- [ ] Snackbar Layout
2017-10-06 11:44:32 +00:00
- [ ] Table
2017-10-02 20:26:28 +00:00
2017-09-30 01:52:10 +00:00
#### Not implemented
2017-09-28 21:49:20 +00:00
2017-10-06 18:48:18 +00:00
- [ ] Card
2017-09-28 21:49:20 +00:00
- [ ] Chips
- [ ] Discrete Slider
- [ ] Grid List
2017-09-29 22:34:45 +00:00
- [ ] Icon Menu
2017-09-28 21:49:20 +00:00
- [ ] Search Field
2017-09-29 22:34:45 +00:00
- [ ] Select Field
2017-09-28 21:49:20 +00:00
- [ ] Stepper
2018-02-02 19:52:06 +00:00
- [ ] Subheaders
2017-09-28 21:49:20 +00:00
- [ ] Toolbar