×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Mar 2008
    Posts
    33

    change widget size when vertical/horizontal layout applied

    Hello.

    Using Qt Designer I genereated 3 buttons. And I adjusted each button's size. After that, I applied a vertical layout to 3 buttons. But as soon as I applied the vertical layout the size of each button was changed to a default size. And I can not find any method to increase the button's size so far. It is impossible until I break the layout.
    Is there any way to change the size of widget even though the vertical/horizontal layout is applied?

    Thanks.

  2. #2
    Super Contributor
    Join Date
    Nov 2009
    Location
    Minnesota, USA
    Posts
    3,209

    Re: change widget size when vertical/horizontal layout applied

    Subclass QPushButton and implement sizeHint. Or simply use setMinimumSize directly on the buttons.

  3. #3
    Registered User
    Join Date
    Mar 2008
    Posts
    33

    Re: change widget size when vertical/horizontal layout applied

    It works!! Thanks

Similar Threads

  1. how to use a horizontal layout inside a vertical layout
    By fareenafatima in forum [Archived] Beginning Qt
    Replies: 3
    Last Post: 2011-02-02, 16:27
  2. swt Text widget vertical scrollbar thumb
    By yatin_indianic in forum Mobile Java Tools & SDKs
    Replies: 1
    Last Post: 2010-01-13, 09:37
  3. disable layout change when the phone is rotated
    By vaxon in forum Mobile Java General
    Replies: 0
    Last Post: 2009-11-17, 00:13
  4. ListBox with Horizontal & Vertical lines Suppressed
    By gowthamyemme in forum Symbian User Interface
    Replies: 2
    Last Post: 2006-12-27, 19:10
  5. ListBox, vertical & horizontal separator
    By Jeepy in forum Symbian
    Replies: 2
    Last Post: 2005-06-24, 10:26

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×