Results 1 to 2 of 2

Thread: the relationship among the QwtLinearScaleEngine,QwtLogScaleEngine,QwtTransfor m

  1. #1
    Join Date
    Jul 2013
    Posts
    9
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default the relationship among the QwtLinearScaleEngine,QwtLogScaleEngine,QwtTransfor m

    hi,
    I have some questions about the QwtLinearScaleEngine,QwtLogScaleEngine,QwtTransfor m.I don't the relationship among those class clearly.I show some code to describe my question.
    Fist code :
    Qt Code:
    1. logSE->setTransformation(new QwtLogTransform());
    2. plot->setAxisScaleEngine(QwtPlot::xTop,logSE);
    To copy to clipboard, switch view to plain text mode 

    second code:
    Qt Code:
    1. QwtLogScaleEngine *logSE=new QwtLogScaleEngine();
    2. plot->setAxisScaleEngine(QwtPlot::xTop,logSE);
    To copy to clipboard, switch view to plain text mode 

    why are the results different?what is the difference between the two methods?I don't understand.
    Thanks in advance!

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

    Default Re: the relationship among the QwtLinearScaleEngine,QwtLogScaleEngine,QwtTransfor m

    Quote Originally Posted by cp View Post
    why are the results different?what is the difference between the two methods?
    Because you have used 2 different scale engines - if they would do the same, there wouldn't be 2 of them.
    Beside being a silly container for the transformation ( = mapping between plot and paint device coordinates ) a scale engine is responsible for autoscaling and calculating the tick positions.

    Uwe

Similar Threads

  1. Facebook Relationship Visualization
    By Sven in forum Qt-based Software
    Replies: 3
    Last Post: 10th November 2014, 14:26
  2. Replies: 1
    Last Post: 18th April 2012, 17:35
  3. How to get the relationship between two QDockWidget?
    By yunxiaodong in forum Qt Programming
    Replies: 0
    Last Post: 16th August 2011, 09:32
  4. Relationship b/w different classes
    By salmanmanekia in forum Newbie
    Replies: 0
    Last Post: 2nd June 2010, 19:24
  5. How to create an One-to-Many Relationship in QtSqlRelation ?
    By innobleday in forum Qt Programming
    Replies: 3
    Last Post: 13th March 2010, 18: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.