Results 1 to 4 of 4

Thread: Border and Frame

  1. #1
    Join Date
    Nov 2006
    Posts
    19
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Border and Frame

    Hi All,

    I would like to have a Frame (QFrame) which only has a border at the bottom.

    First I set the frameShape to "NoFrame" and then I did set a style sheet like "border-bottom: 1px solid black;" but unfortunately this does not work => no border is visible at the bottom...

    Then I've tried another way... I set the frameShape to "Box" and set a style sheet like "border-bottom: 1px solid black;border-top: 0px;border-right: 0px;border-left: 0px;"

    This works now - I only have a border at the bottom of the frame... but also each widget inside that frame has a border (see attachment).

    So that may be an another way to create a own border behavoir

    For some ideas or suggations I would be happy!
    Many thanks
    Attached Images Attached Images

  2. #2
    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: Border and Frame

    If you don't use an other frame in that frame set a style sheet like that:
    css Code:
    1. QFrame {border: 1px solid #000000;}
    To copy to clipboard, switch view to plain text mode 
    or if you give the outer frame a unique name you can use also frames inside:
    css Code:
    1. QFrame#uniqueName {/*...*/}
    To copy to clipboard, switch view to plain text mode 

  3. #3
    Join Date
    Dec 2008
    Location
    Istanbul, TURKEY
    Posts
    537
    Thanks
    14
    Thanked 13 Times in 13 Posts
    Qt products
    Qt4
    Platforms
    Windows Android

    Default Re: Border and Frame

    check out style sheets module >> selector types

  4. #4
    Join Date
    Nov 2006
    Posts
    19
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Thumbs up Re: Border and Frame

    Hi zgulser,

    that's exactly what I was looking for - it works now perfectly!

    Qt Code:
    1. QFrame#frm_headerDlg {
    2. border-bottom: 1px solid #000000;
    3. border-top: 0px;
    4. border-right: 0px;
    5. border-left: 0px;
    6. }
    To copy to clipboard, switch view to plain text mode 

    Many thanks for your hint!

    beste regards
    big4mil

Similar Threads

  1. Replies: 2
    Last Post: 21st March 2012, 15:30
  2. Video Parsing - Frame by Frame
    By ctote in forum Qt Programming
    Replies: 3
    Last Post: 15th February 2010, 19:30
  3. Show dock widget frame/border
    By maverick_pol in forum Qt Programming
    Replies: 2
    Last Post: 21st May 2009, 11:04
  4. Previous frame inner to this frame(corrupt stack?)
    By coralbird in forum Qt Programming
    Replies: 1
    Last Post: 28th May 2007, 02:35
  5. Previous frame inner to this frame(corrupt stack?)
    By coralbird in forum Qt Programming
    Replies: 17
    Last Post: 29th April 2006, 02:42

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.