+ Reply to Thread
Results 1 to 1 of 1

Thread: QwtPlotCanvas Class

  1. #1
    Join Date
    Dec 2017
    Posts
    6
    Thanks
    4
    Qt products
    Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Android

    Default QwtPlotCanvas Class

    Hi everyone.
    Hope everything is going well.
    I'm beginner.
    I want to use QwtPlotCanvas to change some features of plot like background color and ... .
    I tried to use QwtPlotCanvas as following:

    Qt Code:
    1. MainWindow::MainWindow(QWidget *parent) :
    2. QMainWindow(parent),
    3. ui(new Ui::MainWindow)
    4. {
    5. ui->setupUi(this);
    6. QwtPlot *BioPlot = new QwtPlot(this);
    7. setCentralWidget(BioPlot);
    8.  
    9. QwtPlotCanvas *canvas = new QwtPlotCanvas();
    10. canvas->setFocusIndicator( QwtPlotCanvas::CanvasFocusIndicator );
    11. canvas->setFocusPolicy( Qt::StrongFocus );
    12. canvas->setPalette( Qt::black );
    13. setCanvas( canvas );
    14. ...
    To copy to clipboard, switch view to plain text mode 

    error: 'setCanvas' was not declared in this scope
    setCanvas( canvas );


    How can I resolve the error?
    Last edited by CodeFreak; 4th January 2018 at 21:49.

+ Reply to Thread

Similar Threads

  1. problem with QwtPlotCanvas::paintEvent
    By MickyJhon in forum Qwt
    Replies: 2
    Last Post: 31st January 2014, 10:38
  2. Replies: 5
    Last Post: 13th January 2014, 10:24
  3. Replies: 3
    Last Post: 28th January 2010, 10:15
  4. Replies: 3
    Last Post: 25th August 2009, 16:24
  5. Replies: 3
    Last Post: 27th December 2008, 20:34

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