Giter VIP home page Giter VIP logo

taoquick's Introduction

简体中文


Contents

TaoQuick

This is a QtQuick/Qml Component library, integrated some commonly used QtQuick components, and

make the appropriate function expansion to facilitate development of Qml applications.

Badge preview

Project

Best Practices plan License
CII-badge license-badge

Qt marketplace

https://marketplace.qt.io/collections/newest/products/taoquick

Build

Windows Ubuntu MacOS Android IOS
win-badge ubuntu-badge macos-badge android-badge ios-badge

Release

Released Download Download count
release-badge download-badge download-latest

Repository status

Tag Languages Top Language code size repo size
tag-latest languanges taolanguage code-size repo-size

Issue

Issues pull request
issuse-badge pull-request

Other status

commit freq last commit date forks stars
commit-active commit-latest release-date forks-badge stars-badge

Some Demo Preview

Main Page

Change Skin

Multi-Language

Some Button Controls

Data entry Controls

Table Controls

ListView with tab

Rect Drag Controls

Wizard

Mouse Click Effect

Atom Joggle

ShaderToy-Snail

ShaderToy-SuperMario

Environment

  • Qt 5.9

  • Qt 5.12

  • Qt 5.15

  • Qt6.2 (at branch qt6)

Project Struct

Project Struct as flow:

echo content as table:

Content Reference Remark
src TaoQuick Core Library some qml code, picture and scripts for support designer, not has c++ code
exampes some demo show how to use TaoQuick Core Library
3rdparty thrid party library
mkspecs qmake extern
.github github-actions CI CD

TaoQuick Core Library

Core Library source code path:

src/TaoQuick/Qml

Content:

To avoid confusion with Qt default components, TaoQuick components names all begin with Cus (The abbreviation of Custom)

CusConfig is global configuration, mainly contain font、 theme and so on, all components are displayed in this configuration

Other Contents reference to above table:

Content Reference Remark
Basic Basic Controls such as Text, ToolTip, It is used to unify the basic components in the whole project and facilitate the global replacement when the project becomes huge
CusBackground A simple background box it is usually placed at the beginning of the program to absorb mouse focus from the white space
CusButton button Some commonly used buttons have been encapsulated, and various effects can be customized again
CusCheckBox CheckBox
CusComboBox ComboBox
CusImage Basic Image
CusInput Input
CusLabel Label
CusListView List Simaple custom scrollbars
CusPopup Popup
CusScroll ScrollBar
CusSlider Slider
CusSpinBox SpinBox
CusTable Table It needs to be used with specific C++ model to support the selection, check, draw rect selection, anti-selection, continuous selection and all selection
Effect Effect Animation、PageSwitch and ShaderToy
Misc Others

Use TaoQuick

get code

git clone https://github.com/jaredtao/TaoQuick.git
cd TaoQuick 

qmake

You just need import '.pri' file to project and add import Path to QmlEngine, TaoQuick will be use as local file or qrc resource.

Compared with 'Qml module' and 'Qml C++ plugin', this usage has the following advantages:

  • After importing '.pri', no additional compile, generation of dll or plugin are required

  • No additional copy resources are required to deployment the program

  • After importing '.pri', Qt Creater can support TaoQuick Qml code highlighting and double-clicking the Follow symbol

  • After import the module 'import TaoQuick 1.0' in Qml, you can use the TaoQuick component in The Designer mode of Qt Creater by dragging or visual property editor.(principle: Generate metainfo required by Designer via some script)

detail use step:

  1. copy 'TaoQuick' directory and 'TaoQuick.pri' file from TaoQuick/src to your project

  2. Import 'TaoQuick.pri' files in your project 'pro' file

for eaxmple:

include(TaoQuick.pri)

TaoQuick.pri will define a MACRO: TaoQuickImportPath.

Debug mode will use TaoQuick as local file, and release mode for qrc resource.

  1. add import path in cpp

Before load source qml, TaoQuick need add import path to QmlEngine and set imagePath to context.

if use QQuickView, TaoQuick can be use as flow:

    view.engine()->addImportPath(TaoQuickImportPath);
    view.rootContext()->setContextProperty("taoQuickImportPath", TaoQuickImportPath);

if use QmlEngine, TaoQuick can be use as flow:

    engine.addImportPath(TaoQuickImportPath);
    engine.rootContext()->setContextProperty("taoQuickImportPath", TaoQuickImportPath);

cmake

TaoQuick start support cmake after version 0.5.0 , it's same as qmake.

detail use step:

  1. copy 'TaoQuick' directory and 'taoQuick.cmake' file from TaoQuick/src to your project

  2. Import 'taoQuick.cmake' files in your project 'CMakeLists.txt' file

include(taoQuick.cmake)

taoQuick.cmake will define a MACRO: TaoQuickImportPath.

Debug mode will use TaoQuick as local file, and release mode for qrc resource.

Release mode taoQuick.cmake also define a MACRO TaoQuickRes, that location to qrc file.

your project should add TaoQuickRes to executable, like this:

if (CMAKE_BUILD_TYPE MATCHES "Release")
    add_executable(MyApp ${someSource} ${TaoQuickRes})
else()
    add_executable(MyApp ${someSource})
endif()
  1. add import path in cpp

Before load source qml, TaoQuick need add import path to QmlEngine and set imagePath to context.

if use QQuickView, TaoQuick can be use as flow:

    view.engine()->addImportPath(TaoQuickImportPath);
    view.rootContext()->setContextProperty("taoQuickImportPath", TaoQuickImportPath);

if use QmlEngine, TaoQuick can be use as flow:

    engine.addImportPath(TaoQuickImportPath);
    engine.rootContext()->setContextProperty("taoQuickImportPath", TaoQuickImportPath);

Sponsorship

If you feel the share content is good, treat the author a drink.

it's WeChat Pay and Alipay

taoquick's People

Contributors

darkc343 avatar jared2020 avatar kentkong123 avatar kongdehui1-tal avatar pengguanjun avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

taoquick's Issues

Ubuntu18.04+Qt5.12.3需要修改代码才能运行

Ubuntu 18.04 + Qt5.12.3 环境, 编译代码后运行, 会出现

......
qglx_findConfig: Failed to finding matching FBConfig (8 8 8 8)
qglx_findConfig: Failed to finding matching FBConfig (1 8 8 8)
......

错误, 并且界面卡住无显示内容.

经过搜索stackoverflow, 需要将TaoQuickDemo中的main.cpp中的代码

QSurfaceFormat fmt = QSurfaceFormat::defaultFormat();
fmt.setSamples(4);

修改为

QSurfaceFormat fmt = QSurfaceFormat::defaultFormat();
// fmt.setSamples(4);
fmt.setVersion(3, 0);

修改后即可正常运行查看效果.

具体为什么这样修改, 不是很清楚, 希望能有人帮忙解释一下.

界面整体向右下偏移 出现黑边

效果如图
image

并且标题栏上的功能按钮还是需要在原位置按才有效。

日志

2021-01-28 23:56:09 QWindowsWindow::setGeometry: Unable to set geometry 2520x1680+917-716 (frame: 2520x1680+917-716) on TaoFrameLessView/"" on "\.\DISPLAY1". Resulting geometry: 2908x2352+917-716 (frame: 2908x2352+917-716) margins: 0, 0, 0, 0 minimum size: 800x600 MINMAXINFO maxSize=0,0 maxpos=0,0 mintrack=1400,1050 maxtrack=0,0)

完整日志:2021-01-28_23_log.html.log

CusSpinBox循环绑定

使用CusSpinBox时提示TaoQuick/src/TaoQuick/Qml/CusSpinBox/CusSpinBox.qml:40:9: QML Binding: Binding loop detected for property "value",用的Qt版本是6.4.1

在设计界面报错 无法使用控件

已经在 qt的目录存在 模块 qml/TaoQuick
但是在设计界面的时候 编译器 报错 只能删除 import TaoQuick 1.0
编译器 是 MinGW 版本 qt版本是5.12.3

Automatic type dump of QML module failed.
Errors:
"D:\QT\5.12.3\mingw73_64\bin\qmlplugindump.exe" returned exit code 3.
Arguments: -nonrelocatable TaoQuick 1.0 .
Found a dependency on Qt.labs.folderlistmodel with two major versions:1.0 and 2.1 which is unsupported, discarding smaller version
Found a dependency on QtQuick.Controls with two major versions:1.1 and 2.12 which is unsupported, discarding smaller version
Found a dependency on QtQuick.Controls with two major versions:1.1 and 2.5 which is unsupported, discarding smaller version
QQmlComponent: Component is not ready
file:///D:/QT/5.12.3/mingw73_64/qml/typelist.qml:23:1: module "TaoQuick" plugin "TaoQuick" not found

RoundRectangleShape

When drawing rounded corners with RoundRectangleShape, no judgment is made on the radius and the width and height of the figure

CusComboBox 求支持textRole,valueRole

当我设置textRole,valueRole时,下拉列表显示空白的
但是选择数据之后是正常显示当前已选。

原生combobox没有这个问题,

求解决!

关于TaoQuick增加输入框,对话框相关的组件

涛哥你好
最近我打算用QML写一个项目,发现QML自带的组件控件不满足我的需求,都是需要自己造轮子实现,然后通过查找大量资料发现TaoQuick组件库已经很好的封装了很多常用的组件,不过使用过程中还发现缺少输入框,对话框等相关组件的封装,涛哥有时间能否封装一下这些组件,最后非常感谢TaoQuick大大减少了我的工作量,也感谢涛哥的开源精神!!

编译不通过

examples/TaoQuickShow/CMakeFiles/TaoQuickShow.dir/build.make:75: recipe for target 'examples/TaoQuickShow/CMakeFiles/TaoQuickShow.dir/TaoQuickShow_autogen/mocs_compilation.cpp.o' failed
CMakeFiles/Makefile2:130: recipe for target 'examples/TaoQuickShow/CMakeFiles/TaoQuickShow.dir/all' failed
Makefile:90: recipe for target 'all' failed
g++: error: /UMBCS: No such file or directory
g++: error: /D_UNICODE: No such file or directory
g++: error: /DUNICODE: No such file or directory
make[2]: *** [examples/TaoQuickShow/CMakeFiles/TaoQuickShow.dir/TaoQuickShow_autogen/mocs_compilation.cpp.o] Error 1
make[1]: *** [examples/TaoQuickShow/CMakeFiles/TaoQuickShow.dir/all] Error 2
make: *** [all] Error 2
16:53:08: 进程"/usr/local/bin/cmake"退出,退出代码 2 。
Error while building/deploying project TaoQuick (kit: Desktop Qt 5.12.12 GCC 64bit)
When executing step "Build"
16:53:08: Elapsed time: 00:00.

大佬你好。我在qtcreate下编译,出现这个问题,qt版本是5.12.12

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.