Beginner question about Node-GUI
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Quiet
- Tech stack
- javascript, node.js
- Domain
- desktop
Research direction
Start by reproducing the inline CommonJS example from main() with NodeGUI 0.74.0 and compare its layout access with the API or tutorial referenced in the report. No repository file or test is named; completion would be a confirmed minimal working example or a documented correction to the reported layout usage.
Written by the indexing model from the issue text.
Description
Describe the bug
I keep getting rootview.layout.addWidget and I do not understand why when I'm reading the API...
Sample of my code
const {
QMainWindow,
QWidget,
QLabel,
QLayout,
QPushButton,
QIcon,
QBoxLayout,
Direction,
FlexLayout
} = require("@nodegui/nodegui");
const path = require("path");
function main() {
const rootview = new QWidget();
rootview.setLayout(new FlexLayout());
rootview.setObjectName("rootView");
const label = new QLabel();
label.setObjectName("label");
label.setText("Import");
const view = new QWidget();
view.setObjectName("view");
rootview.layout.addWidget(label);
const win = new QMainWindow();
win.setWindowTitle("Playlist Music TTRPG Manager");
win.resize(1400, 1000);
win.show();
global.win = win;
}
main();
end of the code
Expected behavior
I'm just trying to complete basic tutorial since a week ago and I'm still stuck on the matter.
Do I lack something in my code for it to be recognize a XXX.layout.addWidget() as a function?
Please don't tell me it's because I'm coding in commonJS and it only works with typescript...
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
- OS: W10
- NodeGUI version 0.74.0
- OS Version 22H2 KB5075912
Additional context
Hi, first time trying to dev a GUI and I'm trying with nodegui. I was looking for a discord nodegui dev-based community, but couldn't find one. Hence me making an issue for what's probably the easiest thing you'll ever see here.
But I'm seriously losing hope here, so if somebody is able to help me, I'll gladly take it...
- Dominant language
- C++
- Stars
- 9.2k
- Forks
- 315
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from nodegui/nodegui
-
Difficulty 5/5 Over a week Newbie friendliness 30/100
-
Support QTransform Open
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
Difficulty 5/5 Over a week Newbie friendliness 15/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
-
Sensor initialization takes very long when `--initial-sim-time` is set to current UNIX timestamp Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
gazebosim/gz-sensors#662 · 1 comment ·
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
comp-datalake
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
ClickHouse/ClickHouse#121222 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
LadybirdBrowser/ladybird#12123 ·