Results 1 to 2 of 2

Thread: QwtlegendLabel checked setItemMode resets isDown

  1. #1

    Default QwtlegendLabel checked setItemMode resets isDown

    When a QwtLegendLablel is checked I change the color of the curve which causes a change in the item mode of the label.
    Before changing the color the label was down but because of the call of setItemMode the label is reset "d_data->isDown = false;"
    Is this a bug? Why can't I change the itemMode without resetting the up/down state of the label?

    I hope my description is not too confusing...

  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: QwtlegendLabel checked setItemMode resets isDown

    Quote Originally Posted by infingy View Post
    When a QwtLegendLablel is checked I change the color of the curve which causes a change in the item mode of the label.
    The default implementation of QwtPlotItem::legendData() doesn't set the ModeRole and the mode of the label is set to QwtLegend::defaultItemMode(). In this constellation the item mode doesn't change, when updating the curve pen.
    Even if you have overloaded QwtPlotItem::legendData() returning a ModeRole ( what makes sense, when you need legend labels with different modes ) I don't see how the item mode might change - beside it is manually done in your code somewhere.

    Maybe post some code demonstrating the issue ?

    Uwe

Similar Threads

  1. [QComboBox] setEditable resets validator and completer
    By mentalmushroom in forum Qt Programming
    Replies: 3
    Last Post: 17th May 2012, 11:42
  2. N97 mini resets when running deployed version QSolitaire 1.2.
    By skeletor in forum Installation and Deployment
    Replies: 1
    Last Post: 8th September 2010, 20:19
  3. Replies: 4
    Last Post: 4th August 2010, 20:48
  4. Replies: 0
    Last Post: 19th April 2010, 16:29
  5. Replies: 13
    Last Post: 21st May 2009, 07:43

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.