Results 1 to 4 of 4

Thread: QWT 6 : QwtPlotMarker : Dynamically adjust the alignment

  1. #1
    Join Date
    Jan 2011
    Posts
    14
    Thanks
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default QWT 6 : QwtPlotMarker : Dynamically adjust the alignment

    When a point on a curve selected is too close to the edge above or below, the marker is no longer visible.
    How to detect this situation to change the alignment of AlignBottom to AlignTop and vice versa ?

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

    Default Re: QWT 6 : QwtPlotMarker : Dynamically adjust the alignment

    Derive from QwtPlotMarker and reimplement YourPlotMarker::scaleDivChanged. You probably might also have to implement an event filter for the plot canvas, where you handle resize events.

    Uwe

  3. #3
    Join Date
    Jan 2011
    Posts
    14
    Thanks
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QWT 6 : QwtPlotMarker : Dynamically adjust the alignment

    Quote Originally Posted by Uwe View Post
    Derive from QwtPlotMarker and reimplement YourPlotMarker::scaleDivChanged. You probably might also have to implement an event filter for the plot canvas, where you handle resize events.

    Uwe
    There are no member 'scaleDivChanged' ?

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

    Default Re: QWT 6 : QwtPlotMarker : Dynamically adjust the alignment

    Indeed, it's QwtPlotItem::updateScaleDiv.

    Uwe

Similar Threads

  1. QwtPlotMarker example
    By banita in forum Qwt
    Replies: 1
    Last Post: 24th May 2012, 13:19
  2. Replies: 5
    Last Post: 11th January 2011, 06:37
  3. adjust path thickness dynamically
    By edwardc in forum Qt Programming
    Replies: 0
    Last Post: 2nd October 2010, 04:26
  4. QwtPlotMarker segfault
    By viridis in forum Qwt
    Replies: 4
    Last Post: 17th September 2008, 13:22
  5. QwtPlotMarker confusion
    By baray98 in forum Qwt
    Replies: 3
    Last Post: 20th July 2008, 09:47

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.