Results 1 to 2 of 2

Thread: Best way to draw a Line

  1. #1
    Join Date
    Sep 2007
    Location
    Rome, GA
    Posts
    199
    Thanks
    14
    Thanked 41 Times in 35 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Best way to draw a Line

    I feel slightly stupid asking this, but in my app I have a vertical layout, and I want to put some buttons at the bottom and above them have a seperator line, like how the default buttons in a dialog are seperated with a line.

    What's the best way to draw this line? Should I use a QPainter object to draw one, or is there some pre-made widget that can provide this?

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Best way to draw a Line

    Use QFrame with QFrame::HLine frame shape.

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

    JimDaniel (19th January 2008)

Similar Threads

  1. Qwizard crashed when created in a slot
    By joshlareau in forum Qt Programming
    Replies: 9
    Last Post: 15th January 2008, 09:16
  2. Access Violation on Signal Emit
    By khagzan in forum Qt Programming
    Replies: 2
    Last Post: 25th September 2007, 22:51
  3. Draw a line in a Label
    By sabeesh in forum Qt Programming
    Replies: 4
    Last Post: 23rd July 2007, 13:27
  4. KDE/QWT doubt on debian sarge
    By hildebrand in forum KDE Forum
    Replies: 13
    Last Post: 25th April 2007, 06:13
  5. QTableView paints too much
    By Jimmy2775 in forum Qt Programming
    Replies: 2
    Last Post: 26th July 2006, 18: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.