All Projects → qyvlik → QmlThread

qyvlik / QmlThread

Licence: other
More powerful Thread module in QML.

Programming Languages

C++
36643 projects - #6 most used programming language
QML
638 projects
QMake
1090 projects
javascript
184084 projects - #8 most used programming language

Labels

Projects that are alternatives of or similar to QmlThread

qmlvncviewer
VNC viewer component by qt quick
Stars: ✭ 52 (+67.74%)
Mutual labels:  qml
jstackSeries.sh
Script for capturing a series of thread dumps from a Java process using jstack (on Linux and Windows)
Stars: ✭ 28 (-9.68%)
Mutual labels:  thread
osm
Open sound meter. FFT based application for tuning sound systems.
Stars: ✭ 122 (+293.55%)
Mutual labels:  qml
CorePartition
Universal Cooperative Multithread Lib with real time Scheduler that was designed to work, virtually, into any modern micro controller or Microchip and, also, for user space applications for modern OS (Mac, Linux, Windows) or on FreeRTOS as well. Supports C and C++
Stars: ✭ 18 (-41.94%)
Mutual labels:  thread
youtube-dl-nas
youtube download queue websocket server with login for private NAS.
Stars: ✭ 136 (+338.71%)
Mutual labels:  thread
Metro.qml
Metro UI by qml 使用纯qml构建的Metro风格控件
Stars: ✭ 16 (-48.39%)
Mutual labels:  qml
qml-webchannel-websockets
QML examples for WebChannel and WebSockets.
Stars: ✭ 26 (-16.13%)
Mutual labels:  qml
threadproxy.nim
Simplify Nim Inter-Thread Communication
Stars: ✭ 23 (-25.81%)
Mutual labels:  thread
qt-pushnotifications
No description or website provided.
Stars: ✭ 23 (-25.81%)
Mutual labels:  qml
qml-glsl-coder
live editor of GLSL fragment shaders based on Qt / QML
Stars: ✭ 19 (-38.71%)
Mutual labels:  qml
QmlFFmpegPlayer
ffmpeg decode, Qml/opengl convert yuv to rgb and render
Stars: ✭ 51 (+64.52%)
Mutual labels:  qml
Thread
type safe multi-threading made easier
Stars: ✭ 34 (+9.68%)
Mutual labels:  thread
qt-qrcode
Qt/C++ library for encoding and visualization of data in a QR Code symbol
Stars: ✭ 35 (+12.9%)
Mutual labels:  qml
QmlComponentStyle
QML Component Style Demo Based on Qt5.12。QML组件样式Demo,以Qt5.12为基础版本。
Stars: ✭ 55 (+77.42%)
Mutual labels:  qml
openthread-mqttsn
This repository contains examples using MQTT-SN client implementation for Thread network based on OpenThread SDK.
Stars: ✭ 22 (-29.03%)
Mutual labels:  thread
youtube-downloader
youtube-dl GUI simplify
Stars: ✭ 22 (-29.03%)
Mutual labels:  qml
AuGeo
AuGeo - Augmented Reality for ArcGIS
Stars: ✭ 36 (+16.13%)
Mutual labels:  qml
ChartJs2QML
QML adaptor for Chart.js 2.x that supports startup animations and tooltips
Stars: ✭ 68 (+119.35%)
Mutual labels:  qml
concurrent-programming-for-java
🚀Java并发编程实战
Stars: ✭ 55 (+77.42%)
Mutual labels:  thread
qml-ar
Seamless Augmented Reality module for QML using UchiyaMarkers
Stars: ✭ 32 (+3.23%)
Mutual labels:  qml

QmlThread

More powerful Thread module in QML.

old_code

新的想法

thread_in_qml

之前的设计思路是将 QJSEngine 移动到新线程,并为线程中的 QJSEngine 设计一套注册机制。现在看来拙劣至极。

直接将 QQmlEngine 移动到新的线程,qml 的类型注册与 QQmlEngine 实例化无关。然后 qml 的语法补全和智能提示又比 JavaScript 强太多了。所以决定使用 qml 作为线程处理的代码。

线程连接器:

    Thread {
        id: thread
        source: "./thread/thread_dir_size.qml"
        onMessageReceived: {
            console.log(message.toString())
        }
    }

接口设计可能参照 WebScoket 那样,就像主线程异步连接到了网络中一台功能强劲的电脑,将你的请求转化为运算,然后再将结果发送回主线程。

// thread_dir_size.qml 
// 约定文件名为小写开头,这样 QtCreator 的语法树模型就不会将主线程中的变量映射到这边。
import qyvlik.thread.runnable 0.1
import qyvlik.utility 0.1


QmlRunnable {
    id: runnable

    property var __: DirSize {
        id: dirsize
    }

    onMessageReceived: {
        console.time("dirsize")
        sendMessage(dirsize.dirSize(message));
        console.timeEnd("dirsize")
    }
}

讨论

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].