You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To get going, I followed James Hibbard's Getting started guide on creating
a NodeGUI powered Password Generator application.
Inside it's using a QWidget, holding two instances of QPushButton arranged in a FlexLayout.
Unfortunately the two buttons - which should be sized equally - look wrong.
So on Windows 10 it looks like this:
and on macOS Catalina:
To reproduce this bug, simply clone the starter repo:
import { QMainWindow, QWidget, FlexLayout, QPushButton } from '@nodegui/nodegui';
const win = new QMainWindow();
win.resize(400, 200);
const view = new QWidget();
view.setObjectName("rootView")
const layout1 = new FlexLayout();
view.setLayout(layout1);
win.setCentralWidget(view);
const view3 = new QWidget();
view3.setObjectName("buttonRow");
const layout4 = new FlexLayout();
view3.setLayout(layout4);
layout1.addWidget(view3);
const button1 = new QPushButton();
button1.setObjectName("generateButton");
button1.setText("Generate");
layout4.addWidget(button1);
const button2 = new QPushButton();
button2.setObjectName("copyButton")
button2.setText("Copy to clipboard");
layout4.addWidget(button2);
win.setStyleSheet(`
#rootView {
padding: 5px;
}
#buttonRow {
margin-bottom: 5px;
flex-direction: 'row';
}
#generateButton {
width: 120px;
margin-right: 3px;
}
#copyButton {
width: 120px;
}
`);
win.show();
global.win = win;
Furthermore while digging through the API I stumbled upon the QGroupBox widget. Basically it should draw a box, a title and any child widgets somewhere within the surrounding box.
Sadly this also renders incorrectly.
import { QMainWindow, QWidget, FlexLayout,QRadioButton, QGroupBox} from '@nodegui/nodegui';
const win = new QMainWindow();
const centralWidget = new QWidget();
const rootLayout = new FlexLayout();
centralWidget.setLayout(rootLayout);
const r1 = new QRadioButton();
r1.setText('R1');
const r2 = new QRadioButton();
r2.setText('R2');
const r3 = new QRadioButton();
r3.setText('R3');
const groupBoxLayout = new FlexLayout();
const groupBox = new QGroupBox();
groupBox.setTitle("group")
groupBox.setLayout(groupBoxLayout);
groupBoxLayout.addWidget(r1);
groupBoxLayout.addWidget(r2);
groupBoxLayout.addWidget(r3);
rootLayout.addWidget(groupBox);
win.setCentralWidget(centralWidget);
win.show();
global.win = win;
Both examples utilize the starter repo - which is using NodeGUI v0.57.1. Upgrading to v0.58.0-rc4 did not resolve the issue.
The text was updated successfully, but these errors were encountered:
The flex layout stuff doesn't play quite as well with the normal Qt layouts as you would like. If you want to use the Qt layouts it probably works best if you don't mix in any flex layouts.
To get going, I followed James Hibbard's Getting started guide on creating
a NodeGUI powered Password Generator application.
Inside it's using a QWidget, holding two instances of QPushButton arranged in a FlexLayout.
Unfortunately the two buttons - which should be sized equally - look wrong.
So on Windows 10 it looks like this:
and on macOS Catalina:
To reproduce this bug, simply clone the starter repo:
and use the following index.js
Furthermore while digging through the API I stumbled upon the QGroupBox widget. Basically it should draw a box, a title and any child widgets somewhere within the surrounding box.
Sadly this also renders incorrectly.
Both examples utilize the starter repo - which is using NodeGUI v0.57.1. Upgrading to v0.58.0-rc4 did not resolve the issue.
The text was updated successfully, but these errors were encountered: