Results 1 to 2 of 2

Thread: QWT::Knob with the logarithmic scale

  1. #1
    Join Date
    Mar 2011
    Posts
    1
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default QWT::Knob with the logarithmic scale

    Hi, I am trying to set up logarithmic scale for a Knob, but the following code isn't working. Knob's scale keeps the same values - nothing changes after execution of this code. I would like to have these values: 0.01, 0.02, 0.05, 0,1 0,2 .. 1
    void JOP::scopeGetInicialized(){
    double min, max, step;
    min = 1.0;
    max = 4.0;
    step = 1.0;

    QwtLog10ScaleEngine * log10SE = new QwtLog10ScaleEngine();
    log10SE->divideScale(0.001,0.2,6,2,1);
    ui->KnobTimeA->setScaleEngine(log10SE);
    ui->KnobTimeA->repaint();

    qDebug() << "Scale changed";
    }


    Thank's for help

  2. #2
    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: QWT::Knob with the logarithmic scale

    Quote Originally Posted by hack006 View Post
    I would like to have these values: 0.01, 0.02, 0.05, 0,1 0,2 .. 1
    Qt Code:
    1. knob->setScaleEngine( new QwtLog10ScaleEngine() );
    2. knob->setRange(0.01, 1.0 );
    To copy to clipboard, switch view to plain text mode 
    Uwe

Similar Threads

  1. logarithmic scales
    By sergio486 in forum Qwt
    Replies: 2
    Last Post: 22nd December 2010, 17:05
  2. QWT 5.2.0. Label on knob.
    By dima154 in forum Newbie
    Replies: 1
    Last Post: 11th October 2009, 09:40
  3. How to different Scale and Values in Knob
    By Doug Broadwell in forum Qwt
    Replies: 1
    Last Post: 23rd January 2009, 06:52
  4. logarithmic scale
    By Times in forum Qwt
    Replies: 2
    Last Post: 1st July 2008, 15:41
  5. Replies: 2
    Last Post: 14th March 2008, 12:38

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.