Results 1 to 3 of 3

Thread: Implementing a vertical hairline cursor

  1. #1
    Join Date
    Jan 2019
    Posts
    2
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default Implementing a vertical hairline cursor

    Hi,

    I have implemented a real-time plot in Qwt. Now I need to implement a vertical hairline cursor in my plot. When I click mouse on the plot, it should draw a vertical hairline at the point. I should be able to display the timestamp and the curve value at the corresponding point.

    I guess it can be implemented using some sort of picker and marker, but I could not find an appropriate one or any examples using such things.

    Can somebody advise? Thanks in advance.

    Baas

  2. #2
    Join Date
    Feb 2006
    Location
    Munich, Germany
    Posts
    3,181
    Thanked 842 Times in 791 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Implementing a vertical hairline cursor

    What about the code you find in playground/curvetracker ?

    Uwe

  3. #3
    Join Date
    Jan 2019
    Posts
    2
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Implementing a vertical hairline cursor

    Thank you, Uwe. That works beautifully. I have got it working by using the same class CurveTracker.

    I hadn't noticed the folder named playground containing more examples. I was looking at the folder named 'examples' only.

    Thanks again.

    Baas

Similar Threads

  1. Replies: 0
    Last Post: 29th October 2012, 11:23
  2. how to set Cursor with ms excel cursor like style?
    By xiongxiongchuan in forum Qt Programming
    Replies: 2
    Last Post: 10th August 2010, 02:37
  3. Replies: 2
    Last Post: 2nd October 2009, 15:32
  4. How to synchronize text cursor and cursor in QTextEdit
    By kennyxing in forum Qt Programming
    Replies: 6
    Last Post: 18th February 2007, 09:14
  5. Implementing IME using QT
    By pmohod in forum Qt Programming
    Replies: 0
    Last Post: 16th February 2007, 12:22

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.