Comments (1)
@zaoqi 为了解释moc, 你需要先了解:
qt 是由c++ 编写的. qml 是qt5的一个功能, 可以用js语法来写界面, 本项目就是用qml来写的界面. 为了让js执行环境可以和c++环境交互, 可以利用原生组件, 即c++编写的组件. 原生组件和qml组件可以互相调用, 所以可以实现2种语言执行环境的互相通信. 但是本项目是golang 编写的, 为了避免出现c++代码, 原生组件采用go来编写. 但是go 写的组件qt是不能识别的. 那怎么办? 用c++写一个组件的壳子, 声明所有需要的方法和属性, 但不负责实现, qt对这个壳子的所有调用都会转调go的实现. 而go正好是支持和c混编并互相调用的.
通过扫描你代码里的结构体, 找出go实现的原生组件, 然后自动生成这个壳子, 也就是一个c++的类. 这个过程就叫moc, 生成的壳子叫 moc code
Am I explaining it clearly?
from pan-light.
Related Issues (20)
- 本来就恶心百度网盘,你还让下载百度app扫码登录,你这登录方式看起来是不想要星了 HOT 8
- 还能用吗,我看网站什么的都已经打不开了
- 这个项目还在维护呀!作者加油!
- 大佬,项目文档还有吗,本地服务如何启动
- 建议作者梳理一下开发文档
- 官网打不开 HOT 1
- https://pan-light.peterq.cn/ 打不开
- 请问一下根据资源的fs_id如何得到下载地址
- 获取下载链接错误: unknown download method HOT 1
- vip通道和直接下载都报错 HOT 3
- 作者小心啊,pandownload的作者昨天被抓了 HOT 8
- 如何配置自己的SVIP账号到这个下载器啊
- ubuntu 安装 HOT 1
- 求运行方式,卡住了
- 不能登录 HOT 3
- 开发者文档
- 不能登录
- 无限debug是怎么实现的 HOT 1
- 作者的文档还更新吗
- mac 扫码登录 无反应
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pan-light.