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

QTableWidget support #382

Open gangadharjannu opened 10 months ago

gangadharjannu commented 10 months ago

Hello There,

I am exploring react-nodegui and so far it is good in terms of ease of use.

I am wondering how do we implement table or any other component that is not yet listed in react-nodegui but supported in nodegui ?

For example, I am trying to display table in react-nodegui but not sure what to do ?

I have got the code to display from nodegui but how to do this in react-nodegui ?

const table = new QTableWidget(2, 3);
table.setHorizontalHeaderLabels(["first", "second", "third"]);

const cell00 = new QTableWidgetItem("C00");
const cell01 = new QTableWidgetItem("C01");
const cell10 = new QTableWidgetItem("C10");
const cell11 = new QTableWidgetItem("C11");

table.setItem(0, 0, cell00);
table.setItem(0, 1, cell01);
table.setItem(1, 0, cell10);
table.setItem(1, 1, cell11);

// What to do with table ?

I debugged and see that table is of type widget.

Is there any way we can convert widget into react component ?