menu

NodeGui

A library for building cross-platform native desktop applications with Node.js and CSS.

Channels
Team

NodeGUI watercooler

September 1, 2019 at 8:40am
Show previous messages

January 12, 2020 at 8:59pm
Hi, so I've been experimenting with the possibility of setting a custom property setProperty() to an array (possibly/likely QStringList) and wasn't able to. I've been seeing if there is possibility to create a class (custom class) prop for e.g. vue-nodegui that I've been working on but it would require running through PostCSS most likely to translate selectors to something that would fit like *[classList="class-one"][classList="class-two"]. Is this even possible and if so can we get the ability to set a property to a QStringList? I'm sure a property with a QStringList may be useful outside just this scenario though
Edited
  • reply
  • like

January 14, 2020 at 11:38am
Hello, I'm doing something similar to nodegui for a personal project of mine: I'm using Qt from Nodejs native bindings. How do you guys manager not to block the main nodejs process? It seems that calling QApplication::exec blocks my event loop for obvious reason. How did you manage to still be able to use your nodejs process?
Edited
  • reply
  • like
Oh you use qode, it's written in the docs, my mistake
  • reply
  • like
Oh you use qode, it's written in the docs, my mistake
Hey Kylart, there are few ways to do this. 1. You could do qapp.processEvents() in a setTimeout in js side. This is what majority of qt bindings do. The issue with this approach is that cpu never becomes idle. 2. Another approach is to merge both qt and nodejs event loops. This is what qode does. It basically creates a qapp and runs qapp.exec for you. So on js side you would just write all the window creation etc.
Edited
  • reply
  • like

January 16, 2020 at 5:50pm
is it possible to get nodegui to reload while dev? im just playing with the starter project atm.
  • reply
  • like
is it possible to get nodegui to reload while dev? im just playing with the starter project atm.
You could use nodemon for reload on change. See https://github.com/nodegui/react-nodegui/issues/5#issuecomment-527205530
like-fill
1
  • reply
  • like
also, ive searched the issues and posts here looking for how to do popup windows on events but couldnt find anything. is something like a window factory a thing? would make a nice skeleton for when you need to pass errors or simple dialogs?
  • reply
  • like
You could use nodemon for reload on change. See https://github.com/nodegui/react-nodegui/issues/5#issuecomment-527205530
  • reply
  • like
like-fill
1
  • reply
  • like

January 17, 2020 at 6:08am
also, ive searched the issues and posts here looking for how to do popup windows on events but couldnt find anything. is something like a window factory a thing? would make a nice skeleton for when you need to pass errors or simple dialogs?
We do have QMessagebox for this https://docs.nodegui.org/docs/api/generated/classes/qmessagebox/ , but you will need to use the master release for this which can be installed from here: https://github.com/nodegui/nodegui#installation
like-fill
1
  • reply
  • like

January 17, 2020 at 5:25pm
i was confused and realized there should only be one QMainWidget
  • reply
  • like
are the QMessageBox StandardButtons not implemented yet or is there another way to implement them in QMessageBox?
  • reply
  • like

January 18, 2020 at 3:25pm
are the QMessageBox StandardButtons not implemented yet or is there another way to implement them in QMessageBox?
StandardButtons will not be implemented since we can achieve the desired functionality without them. StandardButtons add additional complexity due to the way qt and nodegui work internally.
  • reply
  • like
one would just use the QpushButton/addButton convention then for all buttons? defaultButton is still a thing as i see it in the docs, correct?
  • reply
  • like

January 21, 2020 at 1:24am
Hey Kylart, there are few ways to do this. 1. You could do qapp.processEvents() in a setTimeout in js side. This is what majority of qt bindings do. The issue with this approach is that cpu never becomes idle. 2. Another approach is to merge both qt and nodejs event loops. This is what qode does. It basically creates a qapp and runs qapp.exec for you. So on js side you would just write all the window creation etc.
Sorry for the late reply, I jumped on something else to resolve this. After looking at qode's code that what I figured out. Unfortunately, I was trying to use Qt bindings within an Electron Process which also has its own Node fork and I did not want to mess with forks to make event loops work together which would be hell to work on. Calling processEvents did not seem to do anything for me for some reason which I still do not understand today :(
  • reply
  • like

February 8, 2020 at 4:33pm
Hi ! Thank you for you fantastic work you're doing here!
  • reply
  • like
I made some good progress in my research app, however I'm blocked with this issue: https://github.com/nodegui/examples/issues/4#issuecomment-583752613
  • reply
  • like
Would love to see a reply from you when you have a chance!
  • reply
  • like

February 26, 2020 at 1:20am
Hey everyone, I'm looking into using QtMultimedia and its widgets. From what I gathered, it seems like NodeGUI intends these APIs to be included in plugins, like in https://github.com/nodegui/nodegui-plugin-example Is this right and I am supposed to clone that repo and go to town doing bindings, or is there another recommended way?
  • reply
  • like

February 28, 2020 at 9:41pm
hello , thanks for this gret project. I got a question for you and the community about distributing an application made with nodegui (qt based version). If i clone the nodegui-starter project, then i do npm install --production, the result is a node_modules dir that weights ~240mb, that is a lot for running an "hello world". Is there a suggested way to release and distribute application in order to minimize its size? Thank you
Edited
  • reply
  • like
hello , thanks for this gret project. I got a question for you and the community about distributing an application made with nodegui (qt based version). If i clone the nodegui-starter project, then i do npm install --production, the result is a node_modules dir that weights ~240mb, that is a lot for running an "hello world". Is there a suggested way to release and distribute application in order to minimize its size? Thank you
Hi You can look at https://github.com/nodegui/packer . Also node_modules folder will not be packaged with the final app. Webpack will bundle only the required js into a single js bundle along with necessary assets.
  • reply
  • like

February 29, 2020 at 8:57am
Hi You can look at https://github.com/nodegui/packer . Also node_modules folder will not be packaged with the final app. Webpack will bundle only the required js into a single js bundle along with necessary assets.
thnx!
  • reply
  • like

March 2, 2020 at 2:35am
I'm trying to go ahead with the QtMultimedia wrappers based on the nodegui-plugin-example project but I'm hitting a wall I assume with the build system. I already added libQt5Multimedia.so and libQt5MultimediaWidgets.so to the target_link_libraries call and I'm trying to import QMediaContent, but it's telling me it doesn't exist when compiling. Any ideas?
  • reply
  • like

March 2, 2020 at 9:08am
I'm trying to go ahead with the QtMultimedia wrappers based on the nodegui-plugin-example project but I'm hitting a wall I assume with the build system. I already added libQt5Multimedia.so and libQt5MultimediaWidgets.so to the target_link_libraries call and I'm trying to import QMediaContent, but it's telling me it doesn't exist when compiling. Any ideas?
Hey Amazing! Can you mention the link to the repo so that I can take a look? Also it will be amazing if you can post the error your are seeing too.
  • reply
  • like

March 2, 2020 at 8:15pm
Hi, I want to try node gui for small pet project. But I can't find folder with production build(
  • reply
  • like
Show more messages