Results 1 to 5 of 5

Thread: Draw Line

  1. #1
    Join Date
    Jan 2009
    Posts
    3
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Draw Line

    Hi,

    I am new to QWT. Can anyone send me a sample code, how to draw a line using QWT?

    Thanks.
    AJ.

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

    Default Re: Draw Line

    What kind of line do you mean? You mean a plot (a curve)?

  3. #3
    Join Date
    Jan 2009
    Posts
    3
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Draw Line

    Hi,

    Please see the attached image. I wanted to draw a line between A and B as shown in the image.


    Regards
    AJ.
    Attached Images Attached Images

  4. #4
    Join Date
    Feb 2006
    Location
    Munich, Germany
    Posts
    3,199
    Thanked 847 Times in 796 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Draw Line

    If you are using a Qwt package from one of the common Linux distributions you probably don't have the Qwt examples.

    Download the official Qwt tarball, where you should find enough example code.

    Uwe

  5. #5
    Join Date
    Jan 2009
    Posts
    3
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Draw Line

    Thanks for the reply.

    I got the idea from examples.

    But in my actual requirement, I need to zoom in/out the graph along with the line what I draw.

    The zoom in/out is working fine with plot curve and other plots. It is not zoom in/out the line drawn using 'drawLine' function.

    How to do it?

    Thanks.

    -AJ.

Similar Threads

  1. QTcpSocket exception.
    By Fastman in forum Qt Programming
    Replies: 9
    Last Post: 29th January 2008, 13:51
  2. Some very weird compilation warnings
    By MarkoSan in forum Qt Programming
    Replies: 21
    Last Post: 23rd January 2008, 16:48
  3. Qwizard crashed when created in a slot
    By joshlareau in forum Qt Programming
    Replies: 9
    Last Post: 15th January 2008, 09:16
  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.