I want 'Next' button always be close to border
Hi,
I have a question on QWidget designed using Qt designer. I want 'Next' button always be close to border but now when i expand window 'Next' button stays wherever it is. I have attached a picture in http://picasaweb.google.com/datha.kr...89783168772242
Can I set some property in Qt creator to do this?
Thanks,
Datha
Re: I want 'Next' button always be close to border
Quote:
Originally Posted by
datha_k
Hi,
I have a question on QWidget designed using Qt designer. I want 'Next' button always be close to border but now when i expand window 'Next' button stays wherever it is. I have attached a picture in
http://picasaweb.google.com/datha.kr...89783168772242
Can I set some property in Qt creator to do this?
Thanks,
Datha
ref. QLayout
Re: I want 'Next' button always be close to border
Hi,
Can you please give more detail please.
I used Qt designer, I have a two buttons and horizontal spacer between them. I initially adjusted the widget size to what I need. But in run time when user expands the widget, it creates vacuum between border of the widget and 'Next' button as shown in http://picasaweb.google.com/datha.kr...89783168772242
Thanks,
Datha
Re: I want 'Next' button always be close to border
Quote:
Originally Posted by
datha_k
Can you please give more detail please.
See the documentation for QLayout, QHBoxLayout, QVBoxLayout, QGridLayout. (Or read: http://doc.trolltech.com/4.6/layout.html)
And you might want to use the Newbie section next time, if you can't handle layouts...
AND please attach images at the board. Don't use 3rd-party sites for that. Because only if you use the board your post will stay consistent.
Re: I want 'Next' button always be close to border
just pust a layout with a stretch on one side :)
2 Attachment(s)
Re: I want 'Next' button always be close to border
OK. I found the solution and it is pretty simple.
- Add 2 buttons, add horizontal spacer between them. Add all these 3 items to horizontal layout.
- Add a vertical spacer between above horizontal layout till end of screen.
- Now click on the form so that none the items are selected. (i.e. horizontal layout and vertical spacer)
- Just select vertical layout. This will set whole screen to vertical layout.
Bingo, i did my first screen
I have attached my '3rd party' image and my current layout image.
Thanks,
Datha