Results 1 to 2 of 2

Thread: Control spacing of a QFrame layout using a Stylesheet

  1. #1
    Join Date
    Aug 2008
    Posts
    24
    Thanks
    2
    Thanked 1 Time in 1 Post

    Default Control spacing of a QFrame layout using a Stylesheet

    I'm trying control the spacing of a QFrame within a QFrame using a stylesheet. If you create a frame in a frame with designer this is what it looks like: (please click Open just below that name to see the image)
    https://docs.google.com/leaf?id=0B3a...thkey=CJfEnKkE

    In designer there are layout margins you can set. They default to 9.
    https://docs.google.com/leaf?id=0B3a...thkey=CM6XmtIC

    If you change the Margins to 0 (zero) on both Frames this is what the frame in frame will look like.
    https://docs.google.com/leaf?id=0B3a...thkey=CKTJz-UD

    This is what I want to do from a Stylesheet.

    In my stylesheet I've done both:
    Qt Code:
    1. QFrame::layout { margin: 0px }
    2.  
    3. margin-top: 0px;
    4. margin-right: 0px;
    5. margin-bottom: 0px;
    6. margin-left: 0px;
    7. spacing: 0px;
    8. padding: 0px;
    9. }
    To copy to clipboard, switch view to plain text mode 

    Based upon looking at the designer it appears that layout is a sub-control of the frame, but I haven't found any documentation about layouts in the stylesheet documents.

    Has anyone done this, I expect is is easy.

  2. #2
    Join Date
    Mar 2008
    Posts
    6
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Control spacing of a QFrame layout using a Stylesheet

    Hi all

    Instead of making up a new thread, my question is exactly like this one. Anyone got an idea of how to control "ContentsMargins" with stylesheet?

Similar Threads

  1. Replies: 1
    Last Post: 10th June 2010, 16:21
  2. A QFrame into a Window control
    By kinju in forum Qt Programming
    Replies: 1
    Last Post: 2nd June 2010, 06:47
  3. Replies: 3
    Last Post: 28th November 2008, 00:57
  4. Problem in layout spacing
    By mails.hemant in forum Qt Tools
    Replies: 15
    Last Post: 24th November 2008, 12:48
  5. QFrame/QTabWidget stylesheet.
    By fanat9 in forum Qt Programming
    Replies: 2
    Last Post: 2nd December 2007, 23:24

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.