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
QInputDialog labels and default responses display incorrectly if they are greater than 21 characters long.
Below I show the minimized files that I used, i.e. package.json, tsconfig.json and src/index.js, as well as the sequence of terminal commands that I used to install, build and run the demonstration app. The key lines are near the end of src/index.js.
const {
QMainWindow,
QWidget,
QMessageBox,
QInputDialog,
QPushButton,
ButtonRole
} = require("@nodegui/nodegui");
const win = new QMainWindow();
const centralWidget = new QWidget();
win.setCentralWidget(centralWidget);
win.show();
global.win = win;
const messageBox = new QMessageBox( centralWidget );
const okButton = new QPushButton();
// Message box widgets can show messages significantly longer than 21 characters.
messageBox.setText('The message box widget is apparently able to show messages of significant length, and certainly greater than 21 characters.');
okButton.setText('OK');
messageBox.addButton(okButton, ButtonRole.AcceptRole);
messageBox.exec();
// Input dialog widgets correctly show labels and default responses up to 21 characters in length.
// However, labels and/or default responses longer than 21 characters in length appear
// as short changing arbitrary messages.
const dialogA = new QInputDialog(centralWidget);
const dialogB = new QInputDialog(centralWidget);
const dialogC = new QInputDialog(centralWidget);
dialogA.setLabelText('label A .............'); // 21 chars -----> works
dialogB.setLabelText('label B ..............'); // 22 chars -----> does not work
dialogC.setLabelText('label C .............'); // 21 chars -----> works
dialogA.setTextValue('input A .............'); // 21 chars -----> works
dialogB.setTextValue('input B .............'); // 21 chars -----> works
dialogC.setTextValue('input C ..............'); // 22 chars -----> does not work
dialogA.exec();
dialogB.exec();
dialogC.exec();
terminal commands:
npm install
npm run build
npm run dev
When the above commands are run, the visible app shows correct output for some but not all of the QInputDialog widgets.
Expected behavior
All of the QInputDialog widget labels and default responses should show as plain text.
Screenshots
correct display in QMessageBox widget even with longer string:
correct display in QInputDialog widget with labels and default responses that are 21 characters long:
incorrect display in QInputDialog widget of label that is 22 characters long; note that multiple runs of the identical code produce different apparently arbitrary incorrect labels, including blank labels on occasion, as shown:
incorrect display in QInputDialog widget of default response that is 22 characters long; note that multiple runs of the identical code produce different apparently arbitrary incorrect default responses (only a single screen shot is shown, but the difference between otherwise identical runs is comparable to the differences shown in the screen shots for labels above):
Desktop:
OS: Mac
NodeGUI version: 0.57.1
OS Version: 12.6
The text was updated successfully, but these errors were encountered:
I have now, to the best of my knowledge, updated my test project to the latest NodeGui version, i.e. v0.60.0. In the installation notes that appear in my console during installation, it seems to indicate install/use of Qt 6.4.1, as you suggested @sedwards2009 .
However, the problems discussed above seem to persist, and in fact may be worse. As before, a QMessageBox seems to work correctly, as shown here:
However, now none of QInputDialog labels or default responses of any length (i.e. whether 21 characters or more) seem to work properly, as shown here:
For the record, I did not change my src/index.js file. My attempts to update nodegui resulted in the following package.json file contents:
Describe the bug
QInputDialog
labels and default responses display incorrectly if they are greater than 21 characters long.Below I show the minimized files that I used, i.e.
package.json
,tsconfig.json
andsrc/index.js
, as well as the sequence of terminal commands that I used to install, build and run the demonstration app. The key lines are near the end ofsrc/index.js
.To Reproduce
package.json
:tsconfig.json
:src/index.js
:terminal commands:
When the above commands are run, the visible app shows correct output for some but not all of the
QInputDialog
widgets.Expected behavior
All of the
QInputDialog
widget labels and default responses should show as plain text.Screenshots
correct display in
QMessageBox
widget even with longer string:correct display in
QInputDialog
widget with labels and default responses that are 21 characters long:incorrect display in
QInputDialog
widget of label that is 22 characters long; note that multiple runs of the identical code produce different apparently arbitrary incorrect labels, including blank labels on occasion, as shown:incorrect display in
QInputDialog
widget of default response that is 22 characters long; note that multiple runs of the identical code produce different apparently arbitrary incorrect default responses (only a single screen shot is shown, but the difference between otherwise identical runs is comparable to the differences shown in the screen shots for labels above):Desktop:
The text was updated successfully, but these errors were encountered: