menu

NodeGui

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

Channels
Team
Posts
Chat
Members
Info
Show previous messages

December 23, 2019 at 7:02pm
  • reply
  • like
I'm guessing it doesn't work on every OS since the latest release is 3 years ago, but I'm using this as a reminder that you can also use almost every npm package with NodeGUI.
  • reply
  • like

December 24, 2019 at 6:53am
I'm wondering, is it possible to grab the screen (take a screenshot or video) using NodeGUI. I'm a newcomer (30 minutes of NodeGUI usage) and realized that in QScreen has a support of grabbing a screen, however QScreen is missing out of NodeGUI?
Like how Dimitar mentioned, you can use any already available npm packages that work with nodejs along side nodegui. https://www.npmjs.com/package/screenshot-desktop this seems to do the job. But if you really want Qt based solution, then maybe we can put it in the backlog. It would be amazing if you can help out exporting it in Nodegui. Its pretty straightforward and we can help you out!
  • reply
  • like

December 28, 2019 at 8:56pm
Hello everyone
  • reply
  • like
Whats the easiest way to do a hover-background change with react-nodegui?
  • reply
  • like
using the style prop only, not a global stylesheet + id
Edited
  • reply
  • like
I have many rows in a table and it feels weird to have to place the same id for different component instances
  • reply
  • like

December 29, 2019 at 3:59am
I have many rows in a table and it feels weird to have to place the same id for different component instances
Could you paste a code snippet here ? You can have styleSheet prop at multiple levels on the component tree. So I would suggest that you set a styleSheet prop just one level above your children you want to style and set the styles there. I can help you out more if you paste a bit of code here.
  • reply
  • like

December 29, 2019 at 12:39pm
Thank you, this is definitely a good solution! Will try to use it in my app
  • reply
  • like
Like how Dimitar mentioned, you can use any already available npm packages that work with nodejs along side nodegui. https://www.npmjs.com/package/screenshot-desktop this seems to do the job. But if you really want Qt based solution, then maybe we can put it in the backlog. It would be amazing if you can help out exporting it in Nodegui. Its pretty straightforward and we can help you out!
Thank you, , I'd love to help, however I'm not a QT guy at all.. Maybe later after I dig in deeper into the source code of NodeGui, I can do something though!
like-fill
1
  • reply
  • like

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
ya i was just reading your reply here:
  • 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