Try using a spacer.
Try using a spacer.
DPinLV (9th August 2006)
Thanks.
The spacer helps, but why do all of controls look centered before I use the spacer?
The tab widget is centered on the form and then one button's left edge is lined up on the left edge of the tab widget and the other button's right edge is lined up on the right edge of the tab widget. If I put a spacer between the buttons is pushes everything out so the right button's left edge lines up with the right edge of the tab widget. What if I want my buttons next to one another on the left side of the form rather than spaced apart like that? How do I accomplish that?
I would need to see your .ui file to know more. I suspect the problem is with the grid. It's trying to line stuff up vertically in columns. I think what you want to do is to put your buttons and spacer in a horizontal layout, then place it with the tab widget in a vertically layout.Originally Posted by DPinLV
Put the spacer to the right of the buttons! (In a horizontal layout, of course).Originally Posted by DPinLV
Brandybuck,
Here is the ui code, thanks.
I'm not sure I follow what you mean about the grid lining stuff up, I'm obviously missing something on how layouts work in QT.
Last edited by jacek; 10th August 2006 at 00:31. Reason: moved .ui file to attachment
Next time, please, post it as an attachment.Originally Posted by DPinLV
DPinLV (10th August 2006)
Ok, Brandybuck,
I see what I was doing wrong, I was using "Layout in Grid" and when I use "Layout Vertically" I get the results I want.
Thank you.
You will need two layouts. Select both buttons and the spacer, then select "layout horizontally". Then select the main window and select "layout vertically".Originally Posted by DPinLV
Bookmarks