nodegui 是基于qt + nodejs 的跨平台桌面开发方案,官方同时也提供了很不错的文档 简单使用 使用官方的starter clone 代码 git clone https: //github.com/nodegui/nodegui-starter.git 安装依赖 有点慢,稍等
nodegui 是基于qt + nodejs 的跨平台桌面开发方案,官方同时也提供了很不错的文档
简单使用
使用官方的starter
- clone 代码
git clone https://github.com/nodegui/nodegui-starter.git
- 安装依赖
有点慢,稍等
cd nodegui-starter.
yarn
效果:
@nodegui/nodegui@0.1.8 install /Users/dalong/Documents/GitHub/nodegui-starter/node_modules/@nodegui/nodegui
> npm -v
?
6.9.0
?
> @nodegui/qode@1.0.4 postinstall /Users/dalong/Documents/GitHub/nodegui-starter/node_modules/@nodegui/qode
> node install.js
?
Local Qode 1.0.4 archive doesnt exists
Extracting binaries
?
> @nodegui/nodegui@0.1.8 postinstall /Users/dalong/Documents/GitHub/nodegui-starter/node_modules/@nodegui/nodegui
> npm run build:addon
?
?
> @nodegui/nodegui@0.1.8 build:addon /Users/dalong/Documents/GitHub/nodegui-starter/node_modules/@nodegui/nodegui
> node-gyp -j 8 configure build
?
CC(target) Release/obj.target/nothing/../../node-addon-api/src/nothing.o
TOUCH 8d54a0613d50a84adae49a5312f848b52b1b3ed9.intermediate
ACTION binding_gyp_qtnode_target_symlink_qt_headers 8d54a0613d50a84adae49a5312f848b52b1b3ed9.intermediate
LIBTOOL-STATIC Release/nothing.a
CXX(target) Release/obj.target/qtnode/src/cpp/main.o
CXX(target) Release/obj.target/qtnode/src/cpp/Extras/Utils/nutils.o
CXX(target) Release/obj.target/qtnode/src/cpp/core/FlexLayout/flexlayout.o
CXX(target) Release/obj.target/qtnode/src/cpp/core/FlexLayout/flexitem.o
CXX(target) Release/obj.target/qtnode/src/cpp/core/YogaWidget/nodestyle.o
CXX(target) Release/obj.target/qtnode/src/cpp/core/Events/eventsmap.o
CXX(target) Release/obj.target/qtnode/src/cpp/core/Events/eventwidget.o
CXX(target) Release/obj.target/qtnode/src/cpp/core/YogaWidget/yogawidget.o
CXX(target) Release/obj.target/qtnode/src/cpp/QtGui/QApplication/qapplication_wrap.o
CXX(target) Release/obj.target/qtnode/src/cpp/QtGui/QClipboard/qclipboard_wrap.o
CXX(target) Release/obj.target/qtnode/src/cpp/QtGui/QEvent/QKeyEvent/qkeyevent_wrap.o
CXX(target) Release/obj.target/qtnode/src/cpp/QtGui/QPixmap/qpixmap_wrap.o
- 启动
yarn start
- 效果
说明
nodegui 做为跨平台的桌面开发还是不错的,性能很好,注意noodejs 的版本需要v12.0 以及以上的.同时官方也包含了一个基于react 的开发包,
而且还提供了一个跨平台的打包框架packer
参考资料
https://github.com/nodegui/nodegui
https://nodegui.github.io/nodegui/