Results 1 to 2 of 2

Thread: manually drawing on the canvas

  1. #1
    Join Date
    Oct 2010
    Posts
    58
    Thanks
    26
    Qt products
    Qt4
    Platforms
    Windows

    Default manually drawing on the canvas

    Hi, I was wondering how to allow the users of my plot use the cursor to draw on the canvas. What I envision is during a demonstration the user can circle a part on the plot, or underline a particular part on the curve. If it is possible, I would even like it if they could write notes on the canvas as if the cursor was a pen.

    Could someone please point me in the right direction? Thank you.

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

    Default Re: manually drawing on the canvas

    While the user is working interactively with on the plot I would implement the feedback using a widget overlay. This is exactly the way how QwtPicker draws the rubberbands and the tracker text ( both are overlay widgets ). As soon as the interaction is done the new primitive can be added permanently as a plot item ( an individual one you have to implement ) to the plot.

    Of course you could also try to handle the user interaction without widget overlays ( something what the event_filter example does ), but this might be too slow as soon as the scene gets too complex and replots are too slow for mouse movements.

    Uwe

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

    kja (4th April 2011)

Similar Threads

  1. How to manually pan canvas
    By novackb in forum Qwt
    Replies: 4
    Last Post: 18th February 2011, 17:46
  2. Replies: 8
    Last Post: 8th October 2009, 16:59
  3. Creating event manually and using them
    By vajindarladdad in forum Newbie
    Replies: 4
    Last Post: 28th August 2009, 08:02
  4. Manually using RCC compiler?
    By vishal.chauhan in forum Qt Programming
    Replies: 2
    Last Post: 18th May 2007, 07:47
  5. drawing points on canvas after a time period
    By quickNitin in forum Qt Programming
    Replies: 3
    Last Post: 12th May 2006, 14:12

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.