Results 1 to 3 of 3

Thread: Maybe a bug in QwtLegendItem::setIdentifierWidth(int) ?

  1. #1
    Join Date
    Oct 2008
    Location
    Aachen
    Posts
    20
    Thanks
    5
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Windows

    Question Maybe a bug in QwtLegendItem::setIdentifierWidth(int) ?

    Hi,

    i overloaded the method QwtPlotItem::updateLegend() to change the line width of my legend. The code is really simple and looks like:
    Qt Code:
    1. QwtLegendItem *legendItem = qobject_cast<QwtLegendItem*>(legend->find(this));
    2. if (legendItem) {
    3. //Set the width for the legend identifier to 24 pixels. Default is 8 pixels
    4. legendItem->setIdentifierWidth(24);
    5. }
    To copy to clipboard, switch view to plain text mode 

    I'm using Qt 4.7.2 with Qwt 5.2.1. MS Visual Studio always output the following error: error C2039: 'setIdentifierWidth' : is not a member of 'QwtLegendItem'

    Am i doing something wrong or is it the reason why this method was replaced by void QwtLegendItem::setIdentifierSize(const QSize &size) in Qwt 6.x?

    Thx,
    Yann

  2. #2
    Join Date
    Sep 2011
    Location
    Manchester
    Posts
    538
    Thanks
    3
    Thanked 106 Times in 103 Posts
    Qt products
    Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Maybe a bug in QwtLegendItem::setIdentifierWidth(int) ?

    It's not a bug.
    Many APIs have changed in Qwt6 mainly because of dropping support for Qt3.
    Just use new one and pass required size to it.

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

    yannwilfried (24th January 2012)

  4. #3
    Join Date
    Oct 2008
    Location
    Aachen
    Posts
    20
    Thanks
    5
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Windows

    Default Re: Maybe a bug in QwtLegendItem::setIdentifierWidth(int) ?

    Thx a lot.

    Yann

Similar Threads

  1. Replies: 4
    Last Post: 4th March 2011, 08: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.