Scripting: Dialog.SameWidgetRows not working as expected (original) (raw)
When adding various widgets to a Dialog with row mode Dialog.SameWidgetRows (the default), new rows aren't always created when they should be.
It seems that the type of the previous widget is only checked (to potentially add a new row) for the 2nd widget onwards, the first widget in each row will not cause a break no matter what's added after it.
For example, if I make a Dialog like this:
let dialog = new Dialog("Same Widget Rows Test"); dialog.newRowMode = Dialog.SameWidgetRows; //Just for clarity. This is the default newRowMode.
dialog.addTextInput("Text input"); dialog.addTextInput("Text input"); dialog.addButton("Button"); dialog.addTextInput("Text input"); dialog.addButton("Button"); dialog.addCheckBox("Checkbox"); dialog.addTextInput("Text input"); dialog.addCheckBox("Checkbox"); dialog.addCheckBox("Checkbox"); dialog.addButton("Button"); dialog.addButton("Button"); dialog.addCheckBox("Checkbox"); dialog.addCheckBox("Checkbox"); dialog.addButton("Button"); dialog.addButton("Button"); dialog.addCheckBox("Checkbox"); dialog.addComboBox("ComboBox", ["option"]); dialog.addButton("Button");
dialog.show();
I expect a Dialog that looks like this:
But what I actually get is this:
I observed this behaviour in 1.9.1 (Qt5) and in a 2023.03.07 nightly (Qt6), on Windows 10.