Results 1 to 2 of 2

Thread: Line drawing

  1. #1
    Join Date
    Dec 2006
    Posts
    17
    Thanks
    1
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Line drawing

    Hi,

    Is it possible to draw a line with different colors?
    If so, could u guys help me in knowing that.

    Thanx.

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Line drawing

    Quote Originally Posted by kiranraj View Post
    Is it possible to draw a line with different colors?
    Hi, sure there is, for example:
    Qt Code:
    1. QPainter painter(...);
    2. painter.setPen(Qt::red);
    3. painter.drawLine(...);
    To copy to clipboard, switch view to plain text mode 
    J-P Nurmi

Similar Threads

  1. Find and line endings
    By mikeh in forum Qt Programming
    Replies: 1
    Last Post: 22nd October 2006, 10:16
  2. QTableView paints too much
    By Jimmy2775 in forum Qt Programming
    Replies: 2
    Last Post: 26th July 2006, 18:42
  3. QListWidget-problem
    By Sarma in forum Qt Programming
    Replies: 7
    Last Post: 7th April 2006, 18:49
  4. QTextBrowser with line numbers
    By sreedhar in forum Qt Programming
    Replies: 1
    Last Post: 3rd April 2006, 13:23
  5. MouseEvent on a line
    By Kapil in forum Newbie
    Replies: 1
    Last Post: 25th March 2006, 08:52

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.