Results 1 to 2 of 2

Thread: QwtPlot replot() works on Mac OS, but not in Linux!

  1. #1
    Join Date
    Nov 2008
    Posts
    22
    Qt products
    Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11

    Default QwtPlot replot() works on Mac OS, but not in Linux!

    The Problem:
    I have a plot with controls for changing the scale (linear vs log) and for changing the min X and the max X values, then replot. But the code only works well on Mac OS, and not in Linux!

    I start out with:
    Qt Code:
    1. calibPlot->setAxisScaleEngine(QwtPlot::xBottom, new QwtLinearScaleEngine () );
    2. calibPlot->replot();
    To copy to clipboard, switch view to plain text mode 

    Then I call the control buttons: using a function: setupGraphControls();
    In the function I define the controls, and connect them to corresponding SLOTS:
    Qt Code:
    1. connect( axisXScale, SIGNAL( activated( const QString &)),
    2. this, SLOT(xAxisScaleChange( const QString &) ) );
    3. connect( axisXStart, SIGNAL( textChanged ( const QString & )),
    4. this, SLOT(xAxisScaleMin( const QString & ) ) );
    5. connect( axisXEnd, SIGNAL( textChanged( const QString &)),
    6. this, SLOT(xAxisScaleMax( const QString &) ) );
    To copy to clipboard, switch view to plain text mode 

    The slots are coded as (one example):
    Qt Code:
    1. void CentralPage::xAxisScaleMin( const QString &xMinVal)
    2. {
    3. bool ok;
    4. const bool doReplot = calibPlot->autoReplot();
    5. calibPlot->setAxisScale(QwtPlot::xBottom, xMinVal.toInt(&ok,10),axisXEnd->text().toInt(&ok,10) );
    6. calibPlot->setAutoReplot( doReplot );
    7. calibPlot->replot(); }
    8. }
    To copy to clipboard, switch view to plain text mode 

    In the connection statements, should I be using something else in place of "this" ? Has anyone else seen this issue, I use qwt-5.2.0.

    Any more elegant ways of doing this?

    // Sal Aguinaga
    // Northwestern University

  2. #2

    Default Re: QwtPlot replot() works on Mac OS, but not in Linux!

    I have similar issue. The qwt examples with replot() function works with QT-X11, Qwt5.2 on red hat linux.
    But they do not work with QT-embedded, Qwt5.2 on embedded montavista.

Similar Threads

  1. Replies: 5
    Last Post: 15th January 2009, 09:03
  2. QPalette works differently on windows and linux
    By babu198649 in forum Newbie
    Replies: 3
    Last Post: 6th March 2008, 07:27
  3. Project won't compile under Windows (works under Linux)
    By philski in forum Qt Programming
    Replies: 7
    Last Post: 14th September 2006, 15:29

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.