Hello, Matthias,
I used next code to place controls within dialog:
Code:
setVerticalGroup(createSequentialGroup()
.addWidget(title)
.addGroup(createParallelGroup(lWidth, efWidth))
.addGroup(createParallelGroup(lHeight, efHeight))
.addGroup(createParallelGroup(bCancel, bOk)));
Group col1 = createParallelGroup().addWidget(lWidth, Alignment.RIGHT).addWidget(lHeight, Alignment.RIGHT);
Group col2 = createParallelGroup().addWidget(efWidth, Alignment.RIGHT).addWidget(efHeight, Alignment.RIGHT);
setHorizontalGroup(createParallelGroup()
.addWidget(title, Alignment.CENTER)
.addGroup(createSequentialGroup().addGroup(col1).addGroup(col2))
.addGroup(createSequentialGroup().addWidget(bCancel, Alignment.RIGHT).addWidget(bOk, Alignment.RIGHT)));
But in the end i get slightly misaligned picture (please look at the attached screenshot). How should i change the code to get:
- left and right borders by the biggest label (top), so edit fields and button "OK" aligned to right, labels "height", "width" and the button "Cancel" to left;
-edit fields at the right is aligned to the button "ok" (now the button has shift to the right)?
Thanks!