Results 1 to 4 of 4

Thread: create a qwt plot

  1. #1
    Join Date
    Feb 2011
    Posts
    22
    Thanks
    1
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default create a qwt plot

    Hello all,

    I would like to ask you how to crate a qwt plot which will appear in an already implemented dialog box (see below the code). The problem is i dont know anything about qwt and i dont know how to start. I read the documentation but not so big help for me. The one axis will be a time period (days of a month) and the other one will have only 2 values 0 or 1. Could you please show me an example?

    thank you in advance!

    Qt Code:
    1. #include <QtGui/QWidget>
    2. #include <QSqlQuery>
    3. #include <QString>
    4. #include "Product.h"
    5. #include "creatnewclient.h"
    6.  
    7.  
    8.  
    9. Product::Product(QWidget *parent, Qt::WFlags flags)
    10. : QDialog(parent, flags)
    11. {
    12. ui.setupUi(this);
    13.  
    14. this->setWindowState(Qt::WindowFullScreen);
    15.  
    16. connect(ui.CreateNewClient, SIGNAL( clicked() ), this, SLOT( creatnewclient() ) ) ;
    17. }
    18.  
    19. Product::~Product()
    20. {
    21.  
    22. }
    23. void Product::creatnewclient()
    24. {
    25. CreatNewClient dlg;
    26. dlg.exec();
    27. }
    To copy to clipboard, switch view to plain text mode 

  2. #2
    Join Date
    Mar 2010
    Location
    Brazil
    Posts
    39
    Thanks
    2
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: create a qwt plot

    The Qwt pack comes with some samples. Take a look there.

  3. #3
    Join Date
    Feb 2011
    Posts
    22
    Thanks
    1
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default Re: create a qwt plot

    Thank you for your response! I know about the samples , i already checked them. Because i am really a beginner i would ask for a little more help.

  4. #4
    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: create a qwt plot

    QwtPlot is a QWidget - so there is nothing specific about adding a QwtPlot widget to your layout compared to any other widget.

    So the first thing is to put a empty QwtPlot widget to your layout. When you have managed this come back with more detailed questions about how to continue.

    Uwe

Similar Threads

  1. Replies: 9
    Last Post: 12th May 2014, 01:25
  2. Put plot axis out of the plot
    By KosyakOFF in forum Qwt
    Replies: 7
    Last Post: 21st June 2013, 13:36
  3. Replies: 1
    Last Post: 1st February 2010, 15:13
  4. Replies: 4
    Last Post: 1st May 2009, 11:00
  5. Replies: 7
    Last Post: 22nd September 2008, 22:05

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.