Results 1 to 2 of 2

Thread: Position of plottitle and TopLegend

  1. #1
    Join Date
    Jun 2012
    Posts
    1
    Qt products
    Qt4
    Platforms
    Unix/X11

    Question Position of plottitle and TopLegend

    Hi,

    The documentation says that a TopLegend should be located between the xTop axis and the title. But when I tried the following example, the legend was located above the plot title.
    Is this a bug, an error in the doc or got I something wrong?

    Qt Code:
    1. #include <qwt/qwt_plot.h>
    2. #include <qwt/qwt_plot_curve.h>
    3. #include <qwt/qwt_legend.h>
    4.  
    5. #include <QApplication>
    6.  
    7. int main(int argc, char *argv[])
    8. {
    9. QApplication a(argc, argv);
    10.  
    11. QwtPlot *plot = new QwtPlot;
    12.  
    13. plot->setTitle(QString("TestTitle"));
    14. plot->insertLegend(new QwtLegend, QwtPlot::TopLegend);
    15.  
    16. QwtPlotCurve *curve = new QwtPlotCurve("Test");
    17. curve->attach(plot);
    18.  
    19. plot->show();
    20.  
    21.  
    22. return a.exec();
    23. }
    To copy to clipboard, switch view to plain text mode 

    Tried with qwt 6.0.1 from Ubuntu 12.04 Repo and 6.0.2 svn

    Regards,
    Stefan

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

    Default Re: Position of plottitle and TopLegend

    The documentation is wrong,

    Uwe

Similar Threads

  1. Get GPS Position with QML
    By jgaleanog in forum Qt for Embedded and Mobile
    Replies: 1
    Last Post: 4th August 2011, 11:41
  2. Row and Coloum Position
    By rahulgogoi in forum Qt Programming
    Replies: 2
    Last Post: 30th May 2011, 15:17
  3. Set Position of QLabel
    By Qt Coder in forum Newbie
    Replies: 1
    Last Post: 19th March 2009, 06:51
  4. set Position
    By mickey in forum Newbie
    Replies: 3
    Last Post: 17th June 2006, 21:30

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.