Results 1 to 2 of 2

Thread: How to add a line by source 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 add a line by source code

    Hello!

    This is actually a question that struggled me for quite some time...

    When I'm at the Designer in Qt Creator, I can add a vertical or horizontal line in the .ui, an item that resembles a component such as the others... But I never was able to find such component to be #included and inserted by source code.

    So which is the Line header file, so I may include and work with it by source code?


    Thanks,

    Momergil

  2. #2
    Join Date
    May 2013
    Posts
    321
    Thanks
    9
    Thanked 8 Times in 8 Posts
    Qt products
    Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: How to add a line by source code

    You can use a QFrame to have the result.
    QFrame::HLine 0x0004 QFrame draws a horizontal line that frames nothing (useful as separator)
    QFrame::VLine 0x0005 QFrame draws a vertical line that frames nothing (useful as separator)

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

    Momergil (4th August 2013)

Similar Threads

  1. Source code to *.ui
    By Zergi in forum Qt Tools
    Replies: 3
    Last Post: 28th September 2011, 18:12
  2. no source code
    By banlinhtienphong in forum General Programming
    Replies: 1
    Last Post: 25th July 2011, 17:19
  3. Source code
    By afflictedd2 in forum Qt Programming
    Replies: 3
    Last Post: 4th November 2008, 09:04
  4. source code
    By Colx007 in forum Newbie
    Replies: 5
    Last Post: 19th December 2007, 09:15
  5. Qte source code
    By Gaurav vyas in forum Qt for Embedded and Mobile
    Replies: 1
    Last Post: 1st July 2007, 14:11

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.