Results 1 to 3 of 3

Thread: QwtKnob with only one possible value

  1. #1
    Join Date
    Sep 2014
    Location
    France
    Posts
    6
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default QwtKnob with only one possible value

    Hi everyone !

    I have some trouble on setting up a knob with only one value possible.

    My knob represent some enumerate and let user choose a value.
    An enumerate can be composed of only one field value.

    In this case i can't manage to display my knob with a scale from 0 to 0.

    Is this a bug (fixed?) or is it a normal behavior?

    thanks a lot for your time.

  2. #2
    Join Date
    Sep 2014
    Location
    France
    Posts
    6
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QwtKnob with only one possible value

    Nobodies?

    I've tried this in an empty project, same behavior.
    Seems we can't do this with QwtKnob

  3. #3
    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: QwtKnob with only one possible value

    A scale with a range of 0 is somehow useless, but nevertheless you could try:

    Qt Code:
    1. QwtScaleDiv sd( 0.0, 0.0 );
    2. sd.setTicks( QwtScaleDiv::MajorTick, QList<double>() << 0.0 );
    3. knob->setScale( sd );
    To copy to clipboard, switch view to plain text mode 

    Uwe

Similar Threads

  1. QwtKnob with icons/pixmap for ticks
    By roger1977 in forum Qwt
    Replies: 1
    Last Post: 26th November 2013, 14:19
  2. QwtKnob - how to set the labels?
    By nancy014 in forum Qwt
    Replies: 1
    Last Post: 23rd January 2012, 19:10
  3. QwtKnob and QwtLog10ScaleEngine
    By F. H. Saad in forum Newbie
    Replies: 1
    Last Post: 13th July 2011, 11:21
  4. Replies: 2
    Last Post: 17th April 2010, 16:48

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.