Results 1 to 2 of 2

Thread: How to change the sizeHint() of a horizontal spacer from code

  1. #1
    Join Date
    Jun 2011
    Location
    Porto Alegre, Brazil
    Posts
    482
    Thanks
    165
    Thanked 2 Times in 2 Posts
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default How to change the sizeHint() of a horizontal spacer from code

    Hello!

    I added a horizontal spacer in the .ui of a given dialog and I noticed that I'm able to edit the width and height values of the sizeHint, but I couldn't find how to access that values (to edit them) by code. Is there any way to do this?

    Thanks,

    Momergil

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: How to change the sizeHint() of a horizontal spacer from code

    QSpacerItem::changeSize() and the other functions of that class. Generally though there would be no reason to do this.

  3. The following user says thank you to ChrisW67 for this useful post:

    Momergil (24th January 2014)

Similar Threads

  1. Replies: 4
    Last Post: 15th August 2013, 02:51
  2. Code for Horizontal spacer
    By Gary7 in forum Newbie
    Replies: 2
    Last Post: 15th August 2012, 04:52
  3. Replies: 1
    Last Post: 20th May 2011, 17:36
  4. Designer: Spacer doesn't do what I want...
    By jochen_r in forum Qt Tools
    Replies: 3
    Last Post: 19th January 2006, 05:23

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.