Results 1 to 5 of 5

Thread: PlotMaerker Label Select&Move

  1. #1
    Join Date
    Jun 2013
    Posts
    8
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default PlotMaerker Label Select&Move

    Hello all,

    I have a got a curve with plot markers and markers have got labels. What i have to do is these labels should be movable to another position by the user. Because there are a lot of labels, sometimes user may want to move some labels to see the others.
    Is there a way to do this in qwt? Actually i searched internet but could not find much resource about qwt.

  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: PlotMaerker Label Select&Move

    Have a look at the itemeditor example it shows how to drag&drop QwtPlotShapeItems. The code for QwtPlotMarkers should be very similar.

    Uwe

  3. #3
    Join Date
    Jun 2013
    Posts
    8
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: PlotMaerker Label Select&Move

    Tahnks for your suggestion. I checked itemeditor example. But there is one problem. I am using qwt 5.2 and there is no QwtWidgetOverlay class is version 5.2. So what do you suggest to use instead of the qwtwidgetoverlay class ?

  4. #4
    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: PlotMaerker Label Select&Move

    Qwt 5.2 is from 2009 and doesn't support current Qt versions, but when you really need it I would copy the implementation of QwtWidgetOverlay to your code - it should be almost independent from other Qwt classes.

    Uwe

  5. #5
    Join Date
    Jun 2013
    Posts
    8
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: PlotMaerker Label Select&Move

    Yes it is old, our project too.
    we are using qt 4.6 and qwt 5.2.

    On my plot there are some markers with labels on the curve. Some labels are overlapping each other so user shall be able to move the label and see all labels.

    In my case is it the best way to just copy qwtwidgetoverlay class code and use it ?

Similar Threads

  1. Replies: 4
    Last Post: 19th March 2014, 08:12
  2. Replies: 0
    Last Post: 2nd August 2010, 11:17
  3. Problem in Move Move Event Handler.
    By redgoof in forum Qt Programming
    Replies: 0
    Last Post: 7th April 2010, 11:45
  4. Move Rectangle on mouse Move
    By vermarajeev in forum Qt Programming
    Replies: 24
    Last Post: 14th May 2007, 05:34
  5. label
    By mickey in forum Qt Programming
    Replies: 10
    Last Post: 8th June 2006, 18:58

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.