Results 1 to 6 of 6

Thread: I want 'Next' button always be close to border

  1. #1

    Default 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

  2. #2
    Join Date
    Aug 2009
    Posts
    52
    Thanked 10 Times in 10 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: I want 'Next' button always be close to border

    Quote Originally Posted by datha_k View Post
    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

  3. #3

    Default 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

  4. #4
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: I want 'Next' button always be close to border

    Quote Originally Posted by datha_k View Post
    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.

  5. #5
    Join Date
    Jun 2007
    Location
    India
    Posts
    1,042
    Thanks
    8
    Thanked 133 Times in 128 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: I want 'Next' button always be close to border

    just pust a layout with a stretch on one side

  6. #6

    Default 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
    Attached Images Attached Images

Similar Threads

  1. How to hide Close Button "X" on Widget ?
    By merry in forum Qt Programming
    Replies: 8
    Last Post: 25th January 2020, 08:03
  2. How to Disabel close button on top corner of widget
    By jsmith in forum Qt Programming
    Replies: 4
    Last Post: 2nd August 2010, 16:57
  3. QDialog not showing close button on Mac
    By manojmka in forum Qt Programming
    Replies: 2
    Last Post: 17th September 2008, 12:56
  4. Replies: 5
    Last Post: 21st April 2008, 07:54
  5. Close Button on Modal Widget?
    By vishal.chauhan in forum Qt Programming
    Replies: 5
    Last Post: 18th February 2008, 11:38

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.