nodegui / react-nodegui

Build performant, native and cross-platform desktop applications with native React + powerful CSS like styling.🚀
https://react.nodegui.org
MIT License
6.18k stars 171 forks source link

Question: Any plans for native menu items? #21

Open wcastand opened 5 years ago

wcastand commented 5 years ago

Hello, look like a really promising project.

Do you know if it's possible and if it would be hard to provide a way to create native menu like File Edit, etc ?

Something like this : https://electronjs.org/docs/api/menu

maybe even something like dock menu : https://electronjs.org/docs/tutorial/macos-dock

I didn't use Qt in many many years but would making the bindings be a hard thing to do?

a7ul commented 5 years ago

Hi @wcastand Its not implemented yet, but Yes, we can support this since Qt supports it. It will be implemented soon.

wcastand commented 5 years ago

is there anyway to help? I won't pretend my 10 years old Qt coding skill will be useful to do it myself X) but let me know if I can help with testing or something else :)

a7ul commented 5 years ago

Yes, yes, You can follow the contributors guide to help with the project, docs, testing. https://nodegui.github.io/nodegui/#/development/README @wcastand It is fairly straightforward to get started. I would recommend you start by adding an unexported method to an existing widget. For example: You could add the corresponding Qt method to QProgressbar https://doc.qt.io/qt-5/qprogressbar.html#textVisible-prop to get a grip on it.

Once that is done maybe you can helpout with QMenu which achieves the native menu items

This PR can be used as a guide https://github.com/nodegui/nodegui/issues/36 https://github.com/nodegui/nodegui/pull/39

a7ul commented 5 years ago

You can always use this issue as a discussion channel if you are in need of help.

wcastand commented 5 years ago

I'll probably take a look this weekend then. Thanks for the guide :)