Results 1 to 2 of 2

Thread: make label of QwtPlotMarker invisible

  1. #1
    Join Date
    Nov 2009
    Posts
    94
    Thanks
    14
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11

    Question make label of QwtPlotMarker invisible

    Hello,

    I would like to use the member variable "label" of QwtPlotMArker to check, which index it has, but I don't want the labels to be shown on the plot.
    In a FOR loop I generate some markers and give them labels of loop iteration, so that later I will be able to recognize after selection which of the markes was selected by read the label. Explanation why I want to do so: in my case marker represent a sample point, which is of other class and has got variables for x and y coordinates. So there must be relation between sample point and marker. If I move the marker, the variables of sample points have to be updated by the coordinates of marker. Therefore my idea is to check which of markers is selected and update the corresponding sample point. I suppose it would be possible to subclass QwtPlotMarker and insert there the member variable of type integer and set the iterations number of FOR loop there and after selection just read out this member variable, but I don't want to make new class.
    How can I set the labels invisible, then?

    Thank you

    Vitali

  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: make label of QwtPlotMarker invisible

    User marker->setTitle() instead.

    Uwe

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

    rambo83 (30th November 2009)

Similar Threads

  1. make background invisible
    By punit.doshi.85 in forum Qt Programming
    Replies: 1
    Last Post: 1st October 2008, 10:48
  2. Replies: 4
    Last Post: 23rd June 2008, 17:11
  3. Window OS make distclean && qmake && make one line
    By patrik08 in forum General Programming
    Replies: 4
    Last Post: 22nd March 2007, 10:43
  4. Compiling with Qmake/Make
    By VireX in forum Newbie
    Replies: 25
    Last Post: 22nd February 2007, 05:57

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.