Results 1 to 2 of 2

Thread: Remove an item

  1. #1
    Join Date
    May 2008
    Posts
    276
    Thanks
    13
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Remove an item

    I wouldl like to remove an item from the legend of a plot.
    I tried
    Qt Code:
    1. dDailyValues = new QwtPlotCurve("");
    2. ....
    3. QwtLegend* legend = new QwtLegend(this);
    4. legend->remove(dDailyValues);
    5. insertLegend(legend,QwtPlot::BottomLegend);
    To copy to clipboard, switch view to plain text mode 
    But I still see the symbols for dDailyValues (a line) in the legend
    Why?

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

    Default Re: Remove an item

    dDailyValues->setItemAttribute(QwtPlotItem::Legend, false);

    Uwe

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

    giusepped (17th September 2009)

Similar Threads

  1. View, Scene, Item and thread??
    By dungsivn in forum Qt Programming
    Replies: 5
    Last Post: 20th August 2008, 20:21
  2. remove item for QGirdLayout doesn't work.
    By klnusbaum in forum Qt Programming
    Replies: 4
    Last Post: 24th May 2008, 00:04
  3. Item Delegate Painting
    By stevey in forum Qt Programming
    Replies: 3
    Last Post: 9th May 2008, 08:37
  4. QListWidgetItem remove an item
    By mattia in forum Newbie
    Replies: 4
    Last Post: 9th November 2007, 08:57
  5. Replies: 1
    Last Post: 19th April 2007, 23:23

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.