nodegui 是基於qt + nodejs 的跨平臺桌面開發方案,官方同時也提供了很不錯的文檔node
使用官方的starterreact
git clone https://github.com/nodegui/nodegui-starter.git
cd nodegui-starter.
yarn
效果:git
@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 的開發包,
並且還提供了一個跨平臺的打包框架packergithub
https://github.com/nodegui/nodegui
https://nodegui.github.io/nodegui/npm