Results 1 to 2 of 2

Thread: QwtKnob with icons/pixmap for ticks

  1. #1
    Join Date
    Nov 2013
    Posts
    3
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default QwtKnob with icons/pixmap for ticks

    Hello,
    I am trying to implement a QwtKnob with symbols. So far I am using a QwtCompassScaleDraw with a LabelMap (QMap<double, QString>) of doubles and QChars for qreek symbols e.g. map.insert( 2.0, QString( QChar(0x03A9) ) ) and use setScaleDraw for the knob. This is working quite well but what if I need to use a image for a symbol which is not in the charset. Is there a way for settings an image as a tick?
    Best,
    Roger

  2. #2
    Join Date
    Nov 2013
    Posts
    3
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QwtKnob with icons/pixmap for ticks

    Hi,
    I did find a solution: I subclassed QwtRoundScaleDraw and implemented drawLabel but instead to draw the label I use the painter to draw a corresponding pixmap which depends on the value passed to drawLabel.
    Best,
    Roger

Similar Threads

  1. Replies: 2
    Last Post: 8th April 2013, 06:40
  2. Replies: 14
    Last Post: 30th October 2012, 15:45
  3. QwtKnob - how to set the labels?
    By nancy014 in forum Qwt
    Replies: 1
    Last Post: 23rd January 2012, 19:10
  4. QwtKnob and QwtLog10ScaleEngine
    By F. H. Saad in forum Newbie
    Replies: 1
    Last Post: 13th July 2011, 11:21
  5. Replies: 2
    Last Post: 17th April 2010, 16:48

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.